You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by is...@apache.org on 2014/03/07 13:26:38 UTC
[06/12] git commit: adding a check of null
adding a check of null
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/ba644847
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/ba644847
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/ba644847
Branch: refs/heads/master
Commit: ba6448470d48ad35c31abf83e7fc00d26f5a5afd
Parents: e79a7e2
Author: Isuru <is...@wso2.com>
Authored: Sun Feb 16 20:12:10 2014 +0530
Committer: Isuru <is...@wso2.com>
Committed: Sun Feb 16 20:12:10 2014 +0530
----------------------------------------------------------------------
.../utils/CartridgeSubscriptionUtils.java | 14 ++++++++++++++
1 file changed, 14 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/ba644847/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/utils/CartridgeSubscriptionUtils.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/utils/CartridgeSubscriptionUtils.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/utils/CartridgeSubscriptionUtils.java
index 122fa85..d318224 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/utils/CartridgeSubscriptionUtils.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/utils/CartridgeSubscriptionUtils.java
@@ -295,6 +295,13 @@ public class CartridgeSubscriptionUtils {
throw new ADCException(message, e);
}
+ if (lbCartridgeInfo == null) {
+ String msg = "Please specify a LB cartridge type for the cartridge: " + serviceType + " as category: " +
+ Constants.DEFAULT_LOAD_BALANCER;
+ log.error(msg);
+ throw new ADCException(msg);
+ }
+
lbDataCtxt.setLbCartridgeInfo(lbCartridgeInfo);
if (log.isDebugEnabled()) {
@@ -363,6 +370,13 @@ public class CartridgeSubscriptionUtils {
throw new ADCException(message, e);
}
+ if (lbCartridgeInfo == null) {
+ String msg = "Please specify a LB cartridge type for the cartridge: " + serviceType + " as category: " +
+ Constants.SERVICE_AWARE_LOAD_BALANCER;
+ log.error(msg);
+ throw new ADCException(msg);
+ }
+
lbDataCtxt.setLbCartridgeInfo(lbCartridgeInfo);
// add a property for the service type