airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shame...@apache.org
Subject [08/35] airavata git commit: Trying to fix for the NPE with scratch location
Date Sat, 23 Apr 2016 02:00:20 GMT
Trying to fix for the NPE with scratch location


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

Branch: refs/heads/master
Commit: f5e0f227e50212a1f239f24f28e2616e420e41d5
Parents: 6b49608
Author: Suresh Marru <smarru@apache.org>
Authored: Fri Apr 1 17:27:38 2016 -0400
Committer: Suresh Marru <smarru@apache.org>
Committed: Fri Apr 1 17:27:38 2016 -0400

----------------------------------------------------------------------
 .../src/main/java/org/apache/airavata/gfac/impl/Factory.java     | 4 ++--
 .../airavata/orchestrator/core/utils/OrchestratorUtils.java      | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/f5e0f227/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/Factory.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/Factory.java
b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/Factory.java
index b446e85..9e1cbe5 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/Factory.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/Factory.java
@@ -319,7 +319,7 @@ public abstract class Factory {
             ProcessModel processModel = processContext.getProcessModel();
             String loginUserName = null;
             String overrideLoginUserName = processModel.getResourceSchedule().getOverrideLoginUserName();
-            if (overrideLoginUserName != null || !overrideLoginUserName.equals("")) {
+            if (overrideLoginUserName != null && !overrideLoginUserName.equals(""))
{
                 loginUserName = overrideLoginUserName;
             } else {
                 loginUserName = processContext.getComputeResourcePreference().getLoginUserName();
@@ -336,7 +336,7 @@ public abstract class Factory {
             ProcessModel processModel = processContext.getProcessModel();
             String scratchLocation = null;
             String overrideScratchLocation = processModel.getResourceSchedule().getOverrideScratchLocation();
-            if (overrideScratchLocation != null || !overrideScratchLocation.equals("")) {
+            if (overrideScratchLocation != null && !overrideScratchLocation.equals(""))
{
                 scratchLocation = overrideScratchLocation;
             } else {
                 scratchLocation = processContext.getComputeResourcePreference().getScratchLocation();

http://git-wip-us.apache.org/repos/asf/airavata/blob/f5e0f227/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/utils/OrchestratorUtils.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/utils/OrchestratorUtils.java
b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/utils/OrchestratorUtils.java
index be27eb5..95ff86e 100644
--- a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/utils/OrchestratorUtils.java
+++ b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/utils/OrchestratorUtils.java
@@ -125,7 +125,7 @@ public class OrchestratorUtils {
         try {
             String loginUserName = null;
             String overrideLoginUserName = processModel.getResourceSchedule().getOverrideLoginUserName();
-            if (overrideLoginUserName != null || !overrideLoginUserName.equals("")) {
+            if (overrideLoginUserName != null && !overrideLoginUserName.equals(""))
{
                 loginUserName = overrideLoginUserName;
             } else {
                 GwyResourceProfile gatewayProfile = context.getRegistry().getAppCatalog().getGatewayProfile();
@@ -142,7 +142,7 @@ public class OrchestratorUtils {
         try {
             String scratchLocation = null;
             String overrideScratchLocation = processModel.getResourceSchedule().getOverrideScratchLocation();
-            if (overrideScratchLocation != null || !overrideScratchLocation.equals("")) {
+            if (overrideScratchLocation != null && !overrideScratchLocation.equals(""))
{
                 scratchLocation = overrideScratchLocation;
             } else {
                 GwyResourceProfile gatewayProfile = context.getRegistry().getAppCatalog().getGatewayProfile();


Mime
View raw message