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/07 08:02:53 UTC

stratos git commit: Add a nullcheck while retriving partitions

Repository: stratos
Updated Branches:
  refs/heads/master 11e1cd50c -> 7642b4a3a


Add a nullcheck while retriving partitions


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/7642b4a3
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/7642b4a3
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/7642b4a3

Branch: refs/heads/master
Commit: 7642b4a3afc594527a9a1495e9ca0a2a4de682ed
Parents: 11e1cd5
Author: Lahiru Sandaruwan <la...@apache.org>
Authored: Tue Apr 7 11:32:42 2015 +0530
Committer: Lahiru Sandaruwan <la...@apache.org>
Committed: Tue Apr 7 11:32:42 2015 +0530

----------------------------------------------------------------------
 .../rest/endpoint/util/converter/ObjectConverter.java     | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/7642b4a3/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 49ed3c8..cac69cb 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
@@ -550,10 +550,12 @@ public class ObjectConverter {
         if (stubPartition.getProperties() != null) {
             List<org.apache.stratos.common.beans.cartridge.PropertyBean> propertyBeanList
                     = new ArrayList<org.apache.stratos.common.beans.cartridge.PropertyBean>();
-            for (org.apache.stratos.cloud.controller.stub.Property stubProperty :
-                    stubPartition.getProperties().getProperties()) {
-                if (stubProperty != null) {
-                    propertyBeanList.add(convertStubPropertyToPropertyBean(stubProperty));
+            if(stubPartition.getProperties() != null){
+                for (org.apache.stratos.cloud.controller.stub.Property stubProperty :
+                        stubPartition.getProperties().getProperties()) {
+                    if (stubProperty != null) {
+                        propertyBeanList.add(convertStubPropertyToPropertyBean(stubProperty));
+                    }
                 }
             }
             partition.setProperty(propertyBeanList);