Skip to content

Commit ccaed07

Browse files
Ivan Veselovskiydevozerov
authored andcommitted
IGNITE-5193: Hadoop: better handling of empty paths in environment variables. This closes apache#1928.
1 parent 8214463 commit ccaed07

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/core/src/main/java/org/apache/ignite/internal/processors/hadoop/HadoopClasspathUtils.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import java.util.Collection;
3030
import java.util.LinkedList;
3131
import java.util.List;
32+
import org.apache.ignite.internal.util.typedef.F;
3233

3334
/**
3435
* Hadoop classpath utilities.
@@ -258,7 +259,7 @@ private static String systemOrEnv(String name, String dflt) {
258259
* @return {@code True} if the given path denotes an existing directory.
259260
*/
260261
public static boolean exists(String path) {
261-
if (path == null)
262+
if (F.isEmpty(path))
262263
return false;
263264

264265
Path p = Paths.get(path);

0 commit comments

Comments
 (0)