IGNITE-5193: Hadoop: better handling of empty paths in environment variables. 
This closes #1928.


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

Branch: refs/heads/ignite-5075
Commit: ccaed07da57e2de2c69be55fdf45512d2d90de11
Parents: 8214463
Author: Ivan Veselovskiy <iveselovs...@gridgain.com>
Authored: Wed May 17 13:27:11 2017 +0300
Committer: devozerov <voze...@gridgain.com>
Committed: Wed May 17 13:27:11 2017 +0300

----------------------------------------------------------------------
 .../ignite/internal/processors/hadoop/HadoopClasspathUtils.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/ccaed07d/modules/core/src/main/java/org/apache/ignite/internal/processors/hadoop/HadoopClasspathUtils.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/hadoop/HadoopClasspathUtils.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/hadoop/HadoopClasspathUtils.java
index 8f7f7a8..2b377ed 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/hadoop/HadoopClasspathUtils.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/hadoop/HadoopClasspathUtils.java
@@ -29,6 +29,7 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.LinkedList;
 import java.util.List;
+import org.apache.ignite.internal.util.typedef.F;
 
 /**
  * Hadoop classpath utilities.
@@ -258,7 +259,7 @@ public class HadoopClasspathUtils {
      * @return {@code True} if the given path denotes an existing directory.
      */
     public static boolean exists(String path) {
-        if (path == null)
+        if (F.isEmpty(path))
             return false;
 
         Path p = Paths.get(path);

Reply via email to