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 3860] New: - VAJUtil.createBuildException should nest IvjException
Date Thu, 27 Sep 2001 17:44:38 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=3860>.
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=3860

VAJUtil.createBuildException should nest IvjException

           Summary: VAJUtil.createBuildException should nest IvjException
           Product: Ant
           Version: 1.4
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Minor
          Priority: Other
         Component: Optional Tasks
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: chris.kreussling@ny.frb.org


I expected that VAJUtil would nest the IvjException in the BuildException
it creates, as indicated by the JavaDoc for the method. Instead, the
returned BuildException contains no nested Exception at all.

Here's a JUnit test to demonstrate the expected behavior.

public void test_createBuildException() {
  // SETUP
  BuildException actual = null;
  String expectedErrorMsg = "bogus";
  String[] expectedErrors = {"bogus1","bogus2"};
  IvjException expectedIvjEx = new IvjException( 
    expectedErrorMsg, expectedErrors );

  // RUN
  actual = VAJUtil.createBuildException("bogus",expectedIvjEx);

  // VERIFY
  assertNotNull(actual);

  Throwable t = actual.getException();
  assertNotNull("Nested Exception should not be null",t); // FAILS
  // assertTrue(t.getClass().isAssignableFrom(IvjException.class));
}

Mime
View raw message