[IOT-1880] Adding Fixes for issues generated from static analyzer tool in Notification service c++ , JNI layer
1) In JNINotificationConsumer.cpp, Getting native Provider object is common code for all the native methods.
Added a separate method ' getNativeProvider' to do this, so that method size and complexity will be reduced.
2) JNiNotificationConsumer.cpp Line 1379, and NSTopicslist.cpp Line 59 has changes to fix the issue of Unreachable code.
3) Copy constructor and copy assignment operator are added in class 'NSAcceptedProviders' & 'NSAcceptedConsumers' which has dynamically allocated data members
4) In NSAcceptedProviders class, getProviders() method is changed to const since it is being used by the copy constructors and hence
modified the member variable 'm_mutex' to be mutable.
5) In NSAcceptedConsumers class, getConsumers() method is changed to const since it is being used by the copy constructors
and hence modified the member variable 'm_mutex' to be mutable.
6) In NotiListener.java, the NULL check for mProviderSample is moved above the first instance where mProviderSample is beig used.
Change-Id: Ic18c3d9797a02a73f5397192b21e7dda5926119e
Signed-off-by: Poovizhi <poovizhi.a@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17653
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>