Remove 'using namespace' keyword from JNI headers 59/21059/4
authorGeorge Nash <george.nash@intel.com>
Tue, 13 Jun 2017 21:32:25 +0000 (14:32 -0700)
committerRick Bell <richard.s.bell@intel.com>
Wed, 28 Jun 2017 23:03:42 +0000 (23:03 +0000)
commit485478ccfbf7f57f842e954b8ecf39006a35ab2e
treecacaf2062a904e2ae83642284a879fa5cd6a0714
parentc7d9c3881bf50102a1acccc60262c9545de468ad
Remove 'using namespace' keyword from JNI headers

The use of the 'using namespace OC' was causing an
ambiguous symbol between the C++ OC::OCResource and
the C OCResource when including ocpayload.h.

It is bad practice to use 'using namespace' key words in
header files because any code that includes that header
also imports the namespace, whether they want it or not.

This defeats the purpose of namespaces and can cause name
collisions.

This is part of the work for IOT-2405

Bug: https://jira.iotivity.org/browse/IOT-2405
Change-Id: I8e7e01b1bf645b6333166bd4624a82e9f0345bf8
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20767
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Larry Sachs <larry.j.sachs@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
(cherry picked from commit ef076e24c7e81742b80c048a76a4023c635062d9)
Reviewed-on: https://gerrit.iotivity.org/gerrit/21059
38 files changed:
java/jni/JniEntityHandler.cpp
java/jni/JniOcAccountManager.h
java/jni/JniOcCloudProvisioning.h
java/jni/JniOcDirectPairDevice.h
java/jni/JniOcPlatform.cpp
java/jni/JniOcPlatform.h
java/jni/JniOcPresenceHandle.cpp
java/jni/JniOcPresenceHandle.h
java/jni/JniOcProvisioning.h
java/jni/JniOcRDClient.h
java/jni/JniOcRepresentation.h
java/jni/JniOcResource.cpp
java/jni/JniOcResource.h
java/jni/JniOcResourceRequest.h
java/jni/JniOcResourceResponse.h
java/jni/JniOcSecureResource.cpp
java/jni/JniOcSecureResource.h
java/jni/JniOcSecurity.h
java/jni/JniOnDeleteListener.cpp
java/jni/JniOnDeleteListener.h
java/jni/JniOnDeleteResourceListener.h
java/jni/JniOnDeviceInfoListener.cpp
java/jni/JniOnGetListener.cpp
java/jni/JniOnGetListener.h
java/jni/JniOnMQSubscribeListener.h
java/jni/JniOnMQTopicFoundListener.h
java/jni/JniOnObserveListener.cpp
java/jni/JniOnObserveListener.h
java/jni/JniOnPlatformInfoListener.cpp
java/jni/JniOnPostListener.cpp
java/jni/JniOnPostListener.h
java/jni/JniOnPublishResourceListener.cpp
java/jni/JniOnPublishResourceListener.h
java/jni/JniOnPutListener.cpp
java/jni/JniOnPutListener.h
java/jni/JniProvisionResultListner.cpp
java/jni/JniSecureUtils.cpp
java/jni/JniUtils.cpp