Updated Branches:
  refs/heads/master bc375af13 -> cebf4a23a

fixing a NPE when there're no properties in LB


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

Branch: refs/heads/master
Commit: cebf4a23a9818af8789c6457b7167ab8ea5cee4d
Parents: bc375af
Author: Nirmal Fernando <[email protected]>
Authored: Thu Dec 12 15:13:11 2013 +0530
Committer: Nirmal Fernando <[email protected]>
Committed: Thu Dec 12 15:13:21 2013 +0530

----------------------------------------------------------------------
 .../stratos/rest/endpoint/bean/util/converter/PojoConverter.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/cebf4a23/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/util/converter/PojoConverter.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/util/converter/PojoConverter.java
 
b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/util/converter/PojoConverter.java
index 3290981..8035104 100644
--- 
a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/util/converter/PojoConverter.java
+++ 
b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/util/converter/PojoConverter.java
@@ -79,7 +79,9 @@ public class PojoConverter {
     private static LoadbalancerConfig getLBConfig(LoadBalancerBean 
loadBalancer) {
         LoadbalancerConfig lbConfig = new LoadbalancerConfig();
         lbConfig.setType(loadBalancer.type);
-        lbConfig.setProperties(getProperties(loadBalancer.property));
+        if (loadBalancer.property != null && !loadBalancer.property.isEmpty()) 
{
+            lbConfig.setProperties(getProperties(loadBalancer.property));
+        }
         return lbConfig;
     }
 

Reply via email to