Fixed 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/662728b4 Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/662728b4 Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/662728b4 Branch: refs/heads/master Commit: 662728b4a3e74b24bd0a6437d7759c4235754dff Parents: 2536b33 Author: Shameera Rathnayaka <[email protected]> Authored: Tue Apr 5 16:29:00 2016 -0400 Committer: Shameera Rathnayaka <[email protected]> Committed: Tue Apr 5 16:29:00 2016 -0400 ---------------------------------------------------------------------- .../java/org/apache/airavata/gfac/core/context/ProcessContext.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata/blob/662728b4/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/ProcessContext.java ---------------------------------------------------------------------- diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/ProcessContext.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/ProcessContext.java index 3951216..45e7b94 100644 --- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/ProcessContext.java +++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/ProcessContext.java @@ -169,7 +169,7 @@ public class ProcessContext { }else { String scratchLocation = null; String overrideScratchLocation = processModel.getResourceSchedule().getOverrideScratchLocation(); - if (overrideScratchLocation != null || !overrideScratchLocation.equals("")) { + if (overrideScratchLocation != null && !overrideScratchLocation.equals("")) { scratchLocation = overrideScratchLocation; } else { scratchLocation = computeResourcePreference.getScratchLocation();
