From 827d8593a5860938bd61514279aac1f6b09f3786 Mon Sep 17 00:00:00 2001 From: Virajith Jalaparti Date: Mon, 16 Apr 2018 15:55:00 -0700 Subject: [PATCH] HDFS-13311. RBF: TestRouterAdminCLI#testCreateInvalidEntry fails on Windows. Contributed by Inigo Goiri --- .../main/java/org/apache/hadoop/util/GenericOptionsParser.java | 3 +++ 1 file changed, 3 insertions(+) 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 7b0a25cf4b..a8a513dfb1 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 @@ private String[] preProcessForWindows(String[] args) { } 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]);