maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Gaul (JIRA)" <>
Subject [jira] (SUREFIRE-1029) Report suppressed exceptions
Date Wed, 04 Sep 2013 21:44:52 GMT
Andrew Gaul created SUREFIRE-1029:

             Summary: Report suppressed exceptions
                 Key: SUREFIRE-1029
             Project: Maven Surefire
          Issue Type: Improvement
          Components: Maven Surefire Plugin
    Affects Versions: 2.16
            Reporter: Andrew Gaul

Surefire only reports the exception from a try-with-resources body, not any suppressed exceptions
from close methods.  I see this behavior from the attached

Exception in thread "main" from body
        at AutoCloseableMain.main(
        Suppressed: from close
                at ThrowIOExceptionOnClose.close(
                at AutoCloseableMain.main(

I see a different behavior from the attached from body
        at com.maginatics.AutoCloseableTest.testAutoCloseable(

Surefire could call Throwable.getSuppressed via reflection to maintain compatibility with
earlier versions of Java.  Refer to Guava Closer which does something similar.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message