You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2017/06/16 13:45:05 UTC

airavata git commit: Null check query for dup gateway

Repository: airavata
Updated Branches:
  refs/heads/develop 9a2738574 -> 8b803d7ee


Null check query for dup gateway


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

Branch: refs/heads/develop
Commit: 8b803d7ee7e4c4d4905d1c4bb9214957039f11ca
Parents: 9a27385
Author: Marcus Christie <ma...@apache.org>
Authored: Fri Jun 16 09:44:59 2017 -0400
Committer: Marcus Christie <ma...@apache.org>
Committed: Fri Jun 16 09:44:59 2017 -0400

----------------------------------------------------------------------
 .../service/profile/handlers/TenantProfileServiceHandler.java      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/8b803d7e/airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/TenantProfileServiceHandler.java
----------------------------------------------------------------------
diff --git a/airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/TenantProfileServiceHandler.java b/airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/TenantProfileServiceHandler.java
index 94c5181..c14cbd4 100644
--- a/airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/TenantProfileServiceHandler.java
+++ b/airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/TenantProfileServiceHandler.java
@@ -212,7 +212,7 @@ public class TenantProfileServiceHandler implements TenantProfileService.Iface {
     private boolean checkDuplicateGateway(Gateway gateway) throws TenantProfileServiceException {
         try {
             Gateway duplicateGateway = tenantProfileRepository.getGateway(gateway.getGatewayId());
-            return ((duplicateGateway.getGatewayId().equals(gateway.getGatewayId()))
+            return duplicateGateway != null && ((duplicateGateway.getGatewayId().equals(gateway.getGatewayId()))
                     || (duplicateGateway.getGatewayName().equals(gateway.getGatewayName()))
                     || (duplicateGateway.getGatewayURL().equals(gateway.getGatewayURL())));
         } catch (Exception ex) {