Github user imesh commented on a diff in the pull request: https://github.com/apache/stratos/pull/277#discussion_r27088912 --- Diff: components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/messaging/topology/TopologyBuilder.java --- @@ -65,11 +67,31 @@ public static void handleServiceCreated(List<Cartridge> cartridgeList) { if (!topology.serviceExists(cartridge.getType())) { ServiceType serviceType = cartridge.isMultiTenant() ? ServiceType.MultiTenant : ServiceType.SingleTenant; service = new Service(cartridge.getType(), serviceType); - List<PortMapping> portMappings = cartridge.getPortMappings(); + List<PortMapping> portMappings = Arrays.asList(cartridge.getPortMappings()); Properties properties = new Properties(); - for (Map.Entry<String, String> entry : cartridge.getProperties().entrySet()) { - properties.setProperty(entry.getKey(), entry.getValue()); + + try { + Property[] propertyArray = null; + + if (cartridge.getProperties() != null) { + if (cartridge.getProperties().getProperties() != null){ + propertyArray = cartridge.getProperties().getProperties(); + } + } + + List<Property> propertyList = new ArrayList<Property>(); --- End diff -- I would like to propose to move this logic to a method in Properties class so that it could be reused in other places as well. For the moment I'm merging this pull request, may be we can use a new pull request to do this improvement. Thanks
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---