Fix a bug of discoverResource of RCSDiscoveryManager
authorcoderhyme <jhyo.kim@samsung.com>
Mon, 3 Aug 2015 17:03:36 +0000 (02:03 +0900)
committerMadan Lanka <lanka.madan@samsung.com>
Tue, 4 Aug 2015 00:05:46 +0000 (00:05 +0000)
Discovery with an empty uri should be allowed.

Change-Id: I38700ce30a24b56310966bc3265bf977f2b546d2
Signed-off-by: coderhyme <jhyo.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/2084
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Madan Lanka <lanka.madan@samsung.com>
service/resource-encapsulation/include/RCSDiscoveryManager.h
service/resource-encapsulation/src/resourceClient/RCSDiscoveryManager.cpp

index d73a7be..53ad2b1 100644 (file)
@@ -69,7 +69,7 @@ namespace OIC
              * @param resourceURI The uri of resource to be searched
              * @param cb A callback to obtain discovered resource
              *
-             * @throws InvalidParameterException If any parameter is invalid.
+             * @throws InvalidParameterException If cb is empty.
              *
              * @note The callback will be invoked in an internal thread.
              *
index ef38e12..c51b733 100644 (file)
@@ -61,12 +61,6 @@ namespace OIC
         {
             SCOPE_LOG_F(DEBUG, TAG);
 
-            if (resourceURI.empty())
-            {
-                OC_LOG(ERROR, TAG, "discoverResource NULL resourceURI");
-                throw InvalidParameterException{ "discoverResource NULL resourceURI'" };
-            }
-
             if (!cb)
             {
                 OC_LOG(ERROR, TAG, "discoverResource NULL Callback");