You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Brett Porter (JIRA)" <ji...@codehaus.org> on 2008/12/18 05:30:19 UTC

[jira] Updated: (MNG-3753) ArtifactResolverDiagnoser.diagnose() fails with NPE if nested IOException has no detail message

     [ http://jira.codehaus.org/browse/MNG-3753?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter updated MNG-3753:
------------------------------

    Fix Version/s: 2.0.11

> ArtifactResolverDiagnoser.diagnose() fails with NPE if nested IOException has no detail message
> -----------------------------------------------------------------------------------------------
>
>                 Key: MNG-3753
>                 URL: http://jira.codehaus.org/browse/MNG-3753
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Errors, Logging
>    Affects Versions: 2.0.9
>            Reporter: Benjamin Bentmann
>             Fix For: 2.0.11
>
>         Attachments: null-exception-message.patch
>
>
> The following stack trace has been extraced from MNG-3580:
> {noformat}
> java.lang.NullPointerException
>         at java.lang.String.indexOf(String.java:792)
>         at java.lang.String.indexOf(String.java:770)
>         at org.apache.maven.usability.ArtifactResolverDiagnoser.diagnose(ArtifactResolverDiagnoser.java:53)
>         at org.apache.maven.usability.diagnostics.ErrorDiagnostics.diagnose(ErrorDiagnostics.java:84)
>         at org.apache.maven.DefaultMaven.logDiagnostics(DefaultMaven.java:754)
>         at org.apache.maven.DefaultMaven.logError(DefaultMaven.java:701)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:135)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:618)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> {noformat}
> While this was originally triggerd by an IBM JDK, this is really a Maven bug, the line
> {code:java}
> if ( ioe != null && exception.getMessage().indexOf( ioe.getMessage() ) < 0 )
> {code}
> needs to check whether {{ioe.getMessage()}} is {{null}}. Compare API docs for {{[Throwable.getMessage()|http://java.sun.com/javase/6/docs/api/java/lang/Throwable.html#getMessage()]}}.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira