airavata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emre Brookes (JIRA)" <>
Subject [jira] [Created] (AIRAVATA-1864) GFAC-core - fix to NPE when no DataMovementInterfaces defined
Date Fri, 30 Oct 2015 09:31:27 GMT
Emre Brookes created AIRAVATA-1864:

             Summary: GFAC-core - fix to NPE when no DataMovementInterfaces defined
                 Key: AIRAVATA-1864
             Project: Airavata
          Issue Type: Bug
          Components: GFac
    Affects Versions: 0.15 
         Environment: java gfac core 
            Reporter: Emre Brookes
             Fix For: 0.15 

In,  job submission protocol is being checked as part of data movement
protocol setting.  I believe you want to check if the data movement protocol is null.  Also,
the .get(0) will throw an NPE if you don't check that the getHostPrioritizedDataMovementInterfaces()
has at least one element (in this case I'm checking for not null && not empty).
Likely, similar code should be applied to the previous .get(0) in the job submission protocol
previous to this block. 

Here's the patch as a simple diff -u
---        2015-10-28 12:39:17.586646368 -0500
+++ 2015-10-29 15:01:48.300713817 -0500
@@ -345,7 +345,7 @@

             // set gatewayUserPreferred data movement protocol and interface
-            if (gatewayResourcePreferences.getPreferredJobSubmissionProtocol() == null) {
+            if (gatewayResourcePreferences.getPreferredDataMovementProtocol() == null &&
jobExecutionContext.getHostPrioritizedDataMovementInterfaces() != null && !jobExecutionContext.getHostPrioritizedDataMovementInterfaces().isEmpty()
) {
                 if (jobExecutionContext.getPreferredDataMovementInterface() != null){

This message was sent by Atlassian JIRA

View raw message