airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject airavata git commit: fixing NPE
Date Wed, 28 Oct 2015 17:36:23 GMT
Repository: airavata
Updated Branches:
  refs/heads/airavata-0.15-release-branch 5df32a99b -> fbeb7aefb


fixing NPE


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

Branch: refs/heads/airavata-0.15-release-branch
Commit: fbeb7aefb830a172843bec708b16bd9ff53b4e8a
Parents: 5df32a9
Author: Chathuri Wimalasena <chathuri@apache.org>
Authored: Wed Oct 28 13:36:17 2015 -0400
Committer: Chathuri Wimalasena <chathuri@apache.org>
Committed: Wed Oct 28 13:36:17 2015 -0400

----------------------------------------------------------------------
 .../java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/fbeb7aef/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
index 6f7ae08..e615343 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
@@ -347,7 +347,9 @@ public class BetterGfacImpl implements GFac {
             jobExecutionContext.setPreferredDataMovementProtocol(gatewayResourcePreferences.getPreferredDataMovementProtocol());
             if (gatewayResourcePreferences.getPreferredJobSubmissionProtocol() == null) {
                 jobExecutionContext.setPreferredDataMovementInterface(jobExecutionContext.getHostPrioritizedDataMovementInterfaces().get(0));
-                jobExecutionContext.setPreferredDataMovementProtocol(jobExecutionContext.getPreferredDataMovementInterface().getDataMovementProtocol());
+                if (jobExecutionContext.getPreferredDataMovementInterface() != null){
+                    jobExecutionContext.setPreferredDataMovementProtocol(jobExecutionContext.getPreferredDataMovementInterface().getDataMovementProtocol());
+                }
             } else {
                 // this check is to avoid NPE when job submission endpoints do
                 // not contain any data movement interfaces.


Mime
View raw message