Updated Branches: refs/heads/master 543153c5c -> c1b2921bf
fixing NPE Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/1d3189f6 Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/1d3189f6 Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/1d3189f6 Branch: refs/heads/master Commit: 1d3189f6035a4cf67e5a8bf2a58f244d5a07b096 Parents: a050942 Author: rekathiru <[email protected]> Authored: Fri Jan 17 20:04:14 2014 +0530 Committer: rekathiru <[email protected]> Committed: Fri Jan 17 20:04:14 2014 +0530 ---------------------------------------------------------------------- .../manager/CartridgeSubscriptionManager.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/1d3189f6/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/manager/CartridgeSubscriptionManager.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/manager/CartridgeSubscriptionManager.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/manager/CartridgeSubscriptionManager.java index fd75771..5118185 100644 --- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/manager/CartridgeSubscriptionManager.java +++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/manager/CartridgeSubscriptionManager.java @@ -125,11 +125,16 @@ public class CartridgeSubscriptionManager { if (props != null) { // TODO: temp fix, need to do a proper fix Property[] cartridgeInfoProperties = cartridgeInfo.getProperties(); - int length = cartridgeInfoProperties.length + props.length; - Property[] combined = new Property[length]; - System.arraycopy(cartridgeInfoProperties, 0, combined, 0, cartridgeInfoProperties.length); - System.arraycopy(props, 0, combined, cartridgeInfoProperties.length, props.length); - cartridgeInfo.setProperties(combined); + if(cartridgeInfoProperties != null) { + int length = cartridgeInfoProperties.length + props.length; + Property[] combined = new Property[length]; + System.arraycopy(cartridgeInfoProperties, 0, combined, 0, cartridgeInfoProperties.length); + System.arraycopy(props, 0, combined, cartridgeInfoProperties.length, props.length); + cartridgeInfo.setProperties(combined); + } else { + cartridgeInfo.setProperties(props); + } + } } catch (UnregisteredCartridgeException e) {
