diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/GenericOptionsParser.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/GenericOptionsParser.java index 7b0a25cf4b2..a8a513dfb13 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/GenericOptionsParser.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/GenericOptionsParser.java @@ -525,6 +525,9 @@ public class GenericOptionsParser { } List newArgs = new ArrayList(args.length); for (int i=0; i < args.length; i++) { + if (args[i] == null) { + continue; + } String prop = null; if (args[i].equals("-D")) { newArgs.add(args[i]);