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 ee2ebb4c2ef..b20936c8f37 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 @@ -403,6 +403,7 @@ public class AnnotationProcessor { .getMethod(SWAGGER_ANNOTATIONS_PROPERTIES_KEY), annotatedScopes[i], STRING)); permissions = (String[])methodHandler.invoke(annotatedScopes[i], scopeClass .getMethod(SWAGGER_ANNOTATIONS_PROPERTIES_PERMISSIONS, null),null); + aggregatedPermissions.setLength(0); for (String permission : permissions) { aggregatedPermissions.append(permission); aggregatedPermissions.append(" ");