airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From machris...@apache.org
Subject airavata git commit: Null check query for dup gateway
Date Fri, 16 Jun 2017 13:45:05 GMT
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 <machristie@apache.org>
Authored: Fri Jun 16 09:44:59 2017 -0400
Committer: Marcus Christie <machristie@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) {


Mime
View raw message