ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 13465] New: - JUnit Task's PlainJUnitResultFormatter throws NPE on addError()
Date Wed, 09 Oct 2002 17:58:18 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13465>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13465

JUnit Task's PlainJUnitResultFormatter throws NPE on addError()

           Summary: JUnit Task's PlainJUnitResultFormatter throws NPE on
                    addError()
           Product: Ant
           Version: 1.5.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Optional Tasks
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: dgregorovic@alum.mit.edu


Sample stack trace:

    [junit] Exception in thread "main" java.lang.NullPointerException
    [junit] 	at
org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter.endTest(PlainJUnitResultFormatter.java:208)
    [junit] 	at
org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter.formatError(PlainJUnitResultFormatter.java:245)
    [junit] 	at
org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter.addError(PlainJUnitResultFormatter.java:239)
    [junit] 	at junit.framework.TestResult.addError(TestResult.java:36)
    [junit] 	at junit.framework.TestResult.runProtected(TestResult.java:133)

The problem is that 'l' at line 207 can be null if the error was thrown during
startup.  See XMLJUnitResultFormatter for a sample fix.

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message