slawekjaranowski commented on a change in pull request #68:
URL: https://github.com/apache/maven-shared-utils/pull/68#discussion_r549748775
##########
File path:
src/test/java/org/apache/maven/shared/utils/cli/CommandLineUtilsTest.java
##########
@@ -168,4 +169,18 @@ private void assertCmdLineArgs( final String[] expected,
final String cmdLine )
assertEquals( expected.length, actual.length );
assertEquals( Arrays.asList( expected ), Arrays.asList( actual ) );
}
+
+ @Test
+ public void environmentVariableWithNullShouldNotBeAddedToList() {
+
+ Commandline commandline = new Commandline();
+ commandline.addEnvironment("TEST_NULL_ENV", null);
Review comment:
As I wrote before Command Line object has local map of environment
variable which are provided to Runtime.exec after translate this map to list of
`name=value`. Translation is done in getEnvironmentVariables.
Please look at my last comment at jira and new test in last update.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]