You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ud...@apache.org on 2015/05/15 16:32:55 UTC

[1/2] stratos git commit: fix NPE when no port mappings exist

Repository: stratos
Updated Branches:
  refs/heads/master 2eca41735 -> 99c05656b


fix NPE when no port mappings exist


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

Branch: refs/heads/master
Commit: 99c05656bd45ae41a9e1e1a40e138fcf9fc9361c
Parents: ec93188
Author: Udara Liyanage <ud...@wso2.com>
Authored: Fri May 15 20:02:30 2015 +0530
Committer: Udara Liyanage <ud...@wso2.com>
Committed: Fri May 15 20:02:39 2015 +0530

----------------------------------------------------------------------
 .../stratos/autoscaler/applications/ApplicationUtils.java      | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/99c05656/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/ApplicationUtils.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/ApplicationUtils.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/ApplicationUtils.java
index 85f5331..11971ea 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/ApplicationUtils.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/ApplicationUtils.java
@@ -81,6 +81,12 @@ public class ApplicationUtils {
         // port mappings
         StringBuilder portMapBuilder = new StringBuilder();
         PortMapping[] portMappings = cartridge.getPortMappings();
+
+        if(cartridge.getPortMappings()[0] == null){
+            // first element is null, which means no port mappings.
+            return  null;
+        }
+
         for (PortMapping portMapping : portMappings) {
             int port = portMapping.getPort();
             portMapBuilder.append(port).append("|");


[2/2] stratos git commit: remove partition max from network partition UI

Posted by ud...@apache.org.
remove partition max from network partition UI


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

Branch: refs/heads/master
Commit: ec93188555810c3f689a5c2a48a714c2e694e851
Parents: 2eca417
Author: Udara Liyanage <ud...@wso2.com>
Authored: Fri May 15 19:19:53 2015 +0530
Committer: Udara Liyanage <ud...@wso2.com>
Committed: Fri May 15 20:02:39 2015 +0530

----------------------------------------------------------------------
 .../controllers/forms/default/configure/partitions.json      | 3 +--
 .../controllers/forms/schema/configure/partitions.json       | 8 +-------
 2 files changed, 2 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/ec931885/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/partitions.json
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/partitions.json b/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/partitions.json
index 7002953..466da28 100644
--- a/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/partitions.json
+++ b/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/partitions.json
@@ -9,8 +9,7 @@
                     "name": "region",
                     "value": "default"
                 }
-            ],
-            "partitionMax":0
+            ]
         }
     ]
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/ec931885/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/partitions.json
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/partitions.json b/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/partitions.json
index b0f235c..0e2b65c 100644
--- a/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/partitions.json
+++ b/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/partitions.json
@@ -57,12 +57,6 @@
                                 }
                             }
                         }
-                    },
-                    "partitionMax":{
-                        "id": "root/partitions/0/partitionMax",
-                        "type": "number",
-                        "format":"number",
-                        "title":"Partition Max"
                     }
                 }
             }
@@ -73,4 +67,4 @@
         "partitions",
         "provider"
     ]
-}
\ No newline at end of file
+}