maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Bentmann (JIRA)" <j...@codehaus.org>
Subject [jira] Created: (MNG-3753) ArtifactResolverDiagnoser.diagnose() fails with NPE if nested IOException has no detail message
Date Fri, 12 Sep 2008 13:50:57 GMT
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
         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

        

Mime
View raw message