From 8d6e4cfa01c9992aa0ee801b973ab4af45556866 Mon Sep 17 00:00:00 2001 From: sinthuja Date: Wed, 31 May 2017 18:01:07 +0530 Subject: [PATCH] Fixing issues in resolving the configuration resolving. --- .../mgt/core/util/ApplicationManagementUtil.java | 6 +++--- .../pom.xml | 6 ------ features/application-mgt/pom.xml | 3 +-- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/ApplicationManagementUtil.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/ApplicationManagementUtil.java index 070e57f1c8..6c3d6377df 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/ApplicationManagementUtil.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/ApplicationManagementUtil.java @@ -94,9 +94,9 @@ public class ApplicationManagementUtil { private static T getInstance(Extension extension, Class cls) throws InvalidConfigurationException { try { Class theClass = Class.forName(extension.getClassName()); - Class[] types = new Class[extension.getParameters().size()]; - Object[] paramValues = new String[extension.getParameters().size()]; if (extension.getParameters() != null && extension.getParameters().size() > 0) { + Class[] types = new Class[extension.getParameters().size()]; + Object[] paramValues = new String[extension.getParameters().size()]; for (int i = 0; i < extension.getParameters().size(); i++) { types[i] = String.class; paramValues[i] = extension.getParameters().get(i).getValue(); @@ -104,7 +104,7 @@ public class ApplicationManagementUtil { Constructor constructor = theClass.getConstructor(types); return constructor.newInstance(paramValues); } else { - Constructor constructor = theClass.getConstructor(types); + Constructor constructor = theClass.getConstructor(); return constructor.newInstance(); } } catch (Exception e) { diff --git a/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/pom.xml b/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/pom.xml index b39dededb9..87e8f0c203 100644 --- a/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/pom.xml +++ b/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/pom.xml @@ -49,11 +49,6 @@ org.wso2.carbon.device.application.mgt.api.feature zip - - org.wso2.carbon.devicemgt - org.wso2.carbon.device.application.mgt.extensions.feature - zip - @@ -105,7 +100,6 @@ org.wso2.carbon.devicemgt:org.wso2.carbon.device.application.mgt.api.feature:${carbon.device.mgt.version} - org.wso2.carbon.devicemgt:org.wso2.carbon.device.application.mgt.extensions.feature:${carbon.device.mgt.version} diff --git a/features/application-mgt/pom.xml b/features/application-mgt/pom.xml index d2dc6d5805..7a675aa176 100644 --- a/features/application-mgt/pom.xml +++ b/features/application-mgt/pom.xml @@ -27,7 +27,6 @@ 4.0.0 - org.wso2.carbon.devicemgt application-mgt-feature 2.0.63-SNAPSHOT pom @@ -38,7 +37,7 @@ org.wso2.carbon.device.application.mgt.api.feature org.wso2.carbon.device.application.mgt.ui.feature org.wso2.carbon.device.application.mgt.feature - org.wso2.carbon.device.application.mgt.extensions.feature + org.wso2.carbon.device.application.mgt.server.feature \ No newline at end of file