You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Gili (JIRA)" <ji...@codehaus.org> on 2012/02/19 22:34:03 UTC
[jira] (MNG-5248) NPE at EnvironmentUtils.toStrings()
Gili created MNG-5248:
-------------------------
Summary: NPE at EnvironmentUtils.toStrings()
Key: MNG-5248
URL: https://jira.codehaus.org/browse/MNG-5248
Project: Maven 2 & 3
Issue Type: Bug
Components: Plugin API
Affects Versions: 3.0.4
Environment: Ubuntu 10.04
Reporter: Gili
ProcessBuilder.environment() may contain keys with a null value. In my case "INSIDE_NAUTILUS_PYTHON=" was defined. If maven-exec-plugin is invoked with the same environment variables, the following exception is thrown:
{code}
java.lang.NullPointerException
at org.apache.commons.exec.environment.EnvironmentUtils.toStrings(EnvironmentUtils.java:66)
at org.apache.commons.exec.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:56)
at org.apache.commons.exec.DefaultExecutor.launch(DefaultExecutor.java:254)
at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:319)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:160)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:610)
at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:352)
{code}
Expected behavior: EnvironmentUtils.toStrings() should be able to handle the Map returned by ProcessBuilder with the same interpretation as it treats null keys and values.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (MNG-5248) NPE at EnvironmentUtils.toStrings()
Posted by "Gili (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MNG-5248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=292157#comment-292157 ]
Gili commented on MNG-5248:
---------------------------
I stand corrected. It seems the environment variable has a value of an empty string (not null). Somehow, this gets translates to null along the path from maven-exec-plugin and org.apache.commons.exec.environment.EnvironmentUtils.toStrings().
> NPE at EnvironmentUtils.toStrings()
> -----------------------------------
>
> Key: MNG-5248
> URL: https://jira.codehaus.org/browse/MNG-5248
> Project: Maven 2 & 3
> Issue Type: Bug
> Components: Plugin API
> Affects Versions: 3.0.4
> Environment: Ubuntu 10.04
> Reporter: Gili
>
> ProcessBuilder.environment() may contain keys with a null value. In my case "INSIDE_NAUTILUS_PYTHON=" was defined. If maven-exec-plugin is invoked with the same environment variables, the following exception is thrown:
> {code}
> java.lang.NullPointerException
> at org.apache.commons.exec.environment.EnvironmentUtils.toStrings(EnvironmentUtils.java:66)
> at org.apache.commons.exec.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:56)
> at org.apache.commons.exec.DefaultExecutor.launch(DefaultExecutor.java:254)
> at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:319)
> at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:160)
> at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:610)
> at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:352)
> {code}
> Expected behavior: EnvironmentUtils.toStrings() should be able to handle the Map returned by ProcessBuilder with the same interpretation as it treats null keys and values.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira