Repository: stratos Updated Branches: refs/heads/master 82ba9c97d -> b7d390d94
Revert "Minor improvements to the code" This reverts commit 82ba9c97db7efa568de42d1246274019cbea3330. Project: http://git-wip-us.apache.org/repos/asf/stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/b7d390d9 Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/b7d390d9 Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/b7d390d9 Branch: refs/heads/master Commit: b7d390d94f9c19bf71efc3bce92d13ec5a860d07 Parents: 82ba9c9 Author: Lahiru Sandaruwan <[email protected]> Authored: Mon Apr 27 18:35:23 2015 +0530 Committer: Lahiru Sandaruwan <[email protected]> Committed: Mon Apr 27 18:35:23 2015 +0530 ---------------------------------------------------------------------- .../controller/services/impl/CloudControllerServiceImpl.java | 4 ++-- .../stratos/rest/endpoint/util/converter/ObjectConverter.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/stratos/blob/b7d390d9/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java index 4f05f00..200852b 100644 --- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java +++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java @@ -21,7 +21,6 @@ package org.apache.stratos.cloud.controller.services.impl; import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.apache.stratos.autoscaler.applications.ApplicationUtils; import org.apache.stratos.cloud.controller.concurrent.PartitionValidatorCallable; import org.apache.stratos.cloud.controller.config.CloudControllerConfig; import org.apache.stratos.cloud.controller.context.CloudControllerContext; @@ -59,6 +58,7 @@ public class CloudControllerServiceImpl implements CloudControllerService { private static final Log log = LogFactory.getLog(CloudControllerServiceImpl.class); private static final String PERSISTENCE_MAPPING = "PERSISTENCE_MAPPING"; + public static final String PAYLOAD_PARAMETER = "payload_parameter."; private CloudControllerContext cloudControllerContext = CloudControllerContext.getInstance(); private ExecutorService executorService; @@ -446,7 +446,7 @@ public class CloudControllerServiceImpl implements CloudControllerService { // so the payload param name will // be taken as the substring from the index of '.' to the // end of the property name. - if (property.getName().startsWith(ApplicationUtils.PAYLOAD_PARAMETER)) { + if (property.getName().startsWith(PAYLOAD_PARAMETER)) { String propertyName = property.getName(); String payloadParamName = propertyName.substring(propertyName.indexOf(".") + 1); addToPayload(payload, payloadParamName, property.getValue()); http://git-wip-us.apache.org/repos/asf/stratos/blob/b7d390d9/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/util/converter/ObjectConverter.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/util/converter/ObjectConverter.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/util/converter/ObjectConverter.java index b35d265..a375522 100644 --- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/util/converter/ObjectConverter.java +++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/util/converter/ObjectConverter.java @@ -587,10 +587,10 @@ public class ObjectConverter { = new org.apache.stratos.cloud.controller.stub.domain.NetworkPartition(); networkPartition.setId(networkPartitionBean.getId()); networkPartition.setProvider(networkPartitionBean.getProvider()); - if ((networkPartitionBean.getPartitions() != null) && (!networkPartitionBean.getPartitions().isEmpty())) { + if (networkPartitionBean.getPartitions() != null && !networkPartitionBean.getPartitions().isEmpty()) { networkPartition.setPartitions(convertToStubPartitions(networkPartitionBean.getPartitions())); } - if ((networkPartitionBean.getProperties() != null) && (!networkPartitionBean.getProperties().isEmpty())) { + if (networkPartitionBean.getProperties() != null && !networkPartitionBean.getProperties().isEmpty()) { networkPartition.setProperties(convertPropertyBeansToCCStubProperties(networkPartitionBean.getProperties())); } return networkPartition;
