HADOOP-10094. Merging change r1541991 from trunk to branch-2.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1541993 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f62fbc7f17
commit
e28947c428
|
@ -143,6 +143,9 @@ Release 2.3.0 - UNRELEASED
|
|||
HADOOP-10093. hadoop-env.cmd sets HADOOP_CLIENT_OPTS with a max heap size
|
||||
that is too small. (Shanyu Zhao via cnauroth)
|
||||
|
||||
HADOOP-10094. NPE in GenericOptionsParser#preProcessForWindows().
|
||||
(Enis Soztutar via cnauroth)
|
||||
|
||||
Release 2.2.1 - UNRELEASED
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -431,6 +431,9 @@ public class GenericOptionsParser {
|
|||
if (!Shell.WINDOWS) {
|
||||
return args;
|
||||
}
|
||||
if (args == null) {
|
||||
return null;
|
||||
}
|
||||
List<String> newArgs = new ArrayList<String>(args.length);
|
||||
for (int i=0; i < args.length; i++) {
|
||||
String prop = null;
|
||||
|
|
|
@ -282,4 +282,12 @@ public class TestGenericOptionsParser extends TestCase {
|
|||
Arrays.toString(remainingArgs) + Arrays.toString(expectedRemainingArgs),
|
||||
expectedRemainingArgs, remainingArgs);
|
||||
}
|
||||
|
||||
/** Test passing null as args. Some classes still call
|
||||
* Tool interface from java passing null.
|
||||
*/
|
||||
public void testNullArgs() throws IOException {
|
||||
GenericOptionsParser parser = new GenericOptionsParser(conf, null);
|
||||
parser.getRemainingArgs();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue