Logging the UserStoreException
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/d2700221 Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/d2700221 Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/d2700221 Branch: refs/heads/master Commit: d270022108e2e62518a33a5e71f35435b5b310de Parents: 49f34bb Author: anuruddhal <[email protected]> Authored: Wed May 6 18:12:17 2015 +0530 Committer: Imesh Gunaratne <[email protected]> Committed: Sat May 9 22:47:51 2015 +0530 ---------------------------------------------------------------------- .../apache/stratos/rest/endpoint/api/StratosApiV41Utils.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/stratos/blob/d2700221/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 fb8c28e..4cc59f3 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 @@ -2885,7 +2885,7 @@ public class StratosApiV41Utils { } // filling the email value - if (tenantInfoBean.getEmail() != null && !tenantInfoBean.getEmail().equals("")) { + if (StringUtils.isBlank(tenantInfoBean.getEmail())) { // validate the email try { CommonUtil.validateEmail(tenantInfoBean.getEmail()); @@ -2929,7 +2929,9 @@ public class StratosApiV41Utils { tenantInfoBean.setAdminPassword(""); } } catch (UserStoreException e) { - + String msg = "Error in getting the user store manager is read only " +e.getLocalizedMessage(); + log.error(msg, e); + throw new RestAPIException(msg, e); } try {
