You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by la...@apache.org on 2015/04/27 14:24:06 UTC
[3/3] stratos git commit: Minor improvements to the code
Minor improvements to the code
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/82ba9c97
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/82ba9c97
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/82ba9c97
Branch: refs/heads/master
Commit: 82ba9c97db7efa568de42d1246274019cbea3330
Parents: 34e9140
Author: Vishanth <vi...@gmail.com>
Authored: Mon Apr 27 17:26:44 2015 +0530
Committer: Lahiru Sandaruwan <la...@apache.org>
Committed: Mon Apr 27 17:53:45 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/82ba9c97/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 200852b..4f05f00 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,6 +21,7 @@ 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;
@@ -58,7 +59,6 @@ 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(PAYLOAD_PARAMETER)) {
+ if (property.getName().startsWith(ApplicationUtils.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/82ba9c97/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 a375522..b35d265 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;