airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject [27/57] airavata git commit: fixing throw exception issue
Date Thu, 28 Jul 2016 17:45:41 GMT
fixing throw exception issue


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/7c6a11d3
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/7c6a11d3
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/7c6a11d3

Branch: refs/heads/develop
Commit: 7c6a11d3ab871c2687d08695fbf1421ad5fcabde
Parents: 6148dab
Author: scnakandala <supun.nakandala@gmail.com>
Authored: Mon Jul 11 15:38:40 2016 -0400
Committer: scnakandala <supun.nakandala@gmail.com>
Committed: Mon Jul 11 15:38:40 2016 -0400

----------------------------------------------------------------------
 .../airavata/api/server/handler/AiravataServerHandler.java   | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/7c6a11d3/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
index 2e2c7a9d..176dde4 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
@@ -4520,8 +4520,10 @@ public class AiravataServerHandler implements Airavata.Iface {
             experimentResource.setParentResourceId(experiment.getProjectId());
             experimentResource.setOwnerId(experiment.getUserName()+"@"+experiment.getGatewayId());
             groupManager.createResource(experimentResource);
+        }else{
+            throw new GroupManagerException("Unsupported Resource Type");
         }
-        throw new GroupManagerException("Unsupported Resource Type");
+
     }
 
     private boolean isResourceExistsInGrouper(String resourceId, ResourceType resourceType)
throws GroupManagerException {
@@ -4530,8 +4532,10 @@ public class AiravataServerHandler implements Airavata.Iface {
             return groupManager.isResourceRegistered(resourceId, org.apache.airavata.grouper.resource.ResourceType.PROJECT);
         }else if(resourceType.equals(ResourceType.EXPERIMENT)){
             return groupManager.isResourceRegistered(resourceId, org.apache.airavata.grouper.resource.ResourceType.EXPERIMENT);
+        }else{
+            throw new GroupManagerException("Unsupported Resource Type");
         }
-        throw new GroupManagerException("Unsupported Resource Type");
+
     }
 
     private boolean hasPermission(String userId, String resourceId, ResourceType resourceType,
ResourcePermissionType permissionType) throws GroupManagerException {


Mime
View raw message