From 44d09e09ea51941aa194cb5655698161bf950ecf Mon Sep 17 00:00:00 2001 From: ayyoob Date: Fri, 13 Jan 2017 04:49:17 +0530 Subject: [PATCH] few changes after testing the gateway --- .../mgt/core/config/permission/AnnotationProcessor.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/permission/AnnotationProcessor.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/permission/AnnotationProcessor.java index 1fae1c525e..52c59d753f 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/permission/AnnotationProcessor.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/permission/AnnotationProcessor.java @@ -253,7 +253,12 @@ public class AnnotationProcessor { this.setPermission(annotations[i], permission); } } - permissions.add(permission); + if (permission.getName() == null || permission.getPath() == null) { + log.warn("Permission not assigned to the resource url - " + permission.getMethod() + ":" + + permission.getUrl()); + } else { + permissions.add(permission); + } } } return permissions;