You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by re...@apache.org on 2015/03/01 19:35:29 UTC
[08/50] [abbrv] stratos git commit: fixing a NPE in rest API
fixing a NPE in rest API
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/bf8b3dc1
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/bf8b3dc1
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/bf8b3dc1
Branch: refs/heads/docker-grouping-merge
Commit: bf8b3dc16c40edc5ecb0490c752da66c944edf39
Parents: 9cc8e30
Author: R-Rajkumar <rr...@gmail.com>
Authored: Fri Feb 27 16:01:17 2015 +0530
Committer: R-Rajkumar <rr...@gmail.com>
Committed: Fri Feb 27 19:43:39 2015 +0530
----------------------------------------------------------------------
.../apache/stratos/rest/endpoint/api/StratosApiV41Utils.java | 6 ++++++
1 file changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/bf8b3dc1/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
index e3a44c5..c8f6337 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
@@ -1008,6 +1008,12 @@ public class StratosApiV41Utils {
log.error(message);
throw new RestAPIException(message);
}
+ if (applicationPolicy == null) {
+ String message = String.format("Application policy cannot be null : [application-id] %s. "
+ + "Are you passing application policy?", applicationId);
+ log.error(message);
+ throw new RestAPIException(message);
+ }
ApplicationBean applicationBean = getApplication(applicationId);
int tenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId();