[IOT-2594] Add 'throws' to native api declaration 39/21839/2
authorLarry Sachs <larry.j.sachs@intel.com>
Wed, 9 Aug 2017 16:53:57 +0000 (09:53 -0700)
committerRick Bell <richard.s.bell@intel.com>
Mon, 14 Aug 2017 04:52:48 +0000 (04:52 +0000)
getLinkedDevices() native api declaration in OcSecureResource.java
requires a throws clause in order to catch a possible exception
from the jni implementation layer.

Change-Id: Ic1e02b0d0f2980c1fd10d59ed48575ea2d7e6734
Signed-off-by: Larry Sachs <larry.j.sachs@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21839
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
java/common/src/main/java/org/iotivity/base/OcSecureResource.java

index 8437f2d..06340cd 100644 (file)
@@ -384,8 +384,10 @@ public class OcSecureResource {
     /** Method to get List of device ID of devices linked with invoking device.
      *
      *  @return Sring List  List of device id's of linked devices.
+     *  @throws OcException Failed to get linked devices.
+     *                      Use OcException.GetErrorCode() for more details.
      */
-    public native List<String> getLinkedDevices();
+    public native List<String> getLinkedDevices() throws OcException;
 
      /**
       * Method to get IP address of sercure discovered device.