Github user prabathabey commented on a diff in the pull request:

    https://github.com/apache/stratos/pull/287#discussion_r35573073
  
    --- Diff: 
components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
 ---
    @@ -2239,4 +2258,501 @@ public static ClusterBean getClusterInfo(String 
clusterId) throws RestAPIExcepti
     
             return ObjectConverter.convertClusterToClusterBean(cluster, 
clusterId);
         }
    +
    +    //util methods for Tenants
    +
    +    /**
    +     * Add Tenant
    +     *
    +     * @param tenantInfoBean
    +     * @throws RestAPIException
    +     */
    +    public static void 
addTenant(org.apache.stratos.common.beans.TenantInfoBean tenantInfoBean) throws 
RestAPIException {
    +
    +        try {
    +            CommonUtil.validateEmail(tenantInfoBean.getEmail());
    +        } catch (Exception e) {
    --- End diff --
    
    It's generally not acceptable to catch generic exceptions. If done 
intentionally, might be good to add a comment explaining the reason why it was 
done this way.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to