Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for Throwable.getSuppressed(). #16

Merged
merged 2 commits into from
Nov 4, 2011
Merged

Commits on Jun 12, 2011

  1. Adding support for Throwable.getSuppressed().

    See http://www.oracle.com/technetwork/articles/java/trywithresources-401775.html
    
    - Removed superfluous public from methods in IThrowableProxy interface and added method IThrowableProxy[] getSuppressed().
    - Serialized ThrowableProxyVO will be incompatible since suppressed has been added. Consequently, the respective serialVersionUID has been changed.
    - ThrowableProxyVO.equals is now also checking suppressed.
    - ThrowableProxy is now evaluating suppressed Throwables of its c'tor argument if the Throwable class has a getSuppressed() method, i.e. in case of Java SE 7 and upwards.
    
    This patch is merely adding support of suppressed exceptions to the creation of LoggingEvent/IThrowableProxy. Further support should be added to the following classes:
    
    - ch.qos.logback.classic.db.DBAppender
    - ch.qos.logback.classic.html.DefaultThrowableRenderer
    - ch.qos.logback.classic.net.SyslogAppender
    - ch.qos.logback.classic.pattern.ThrowableProxyConverter
    - ch.qos.logback.classic.spi.ThrowableProxyUtil
      - method asString
    - ch.qos.logback.classic.spi.PackagingDataCalculator
      - method calculate(IThrowableProxy tp) may also need to take suppressed into account.
    huxi committed Jun 12, 2011
    Configuration menu
    Copy the full SHA
    1bb29a6 View commit details
    Browse the repository at this point in the history

Commits on Jun 13, 2011

  1. Calculating packaging data for suppressed Throwables.

    calculate(IThrowableProxy), as expected, needs to support suppressed Throwables, too.
    
    All of this has been tested with Java 7 b145 and is working as expected.
    huxi committed Jun 13, 2011
    Configuration menu
    Copy the full SHA
    05ac03f View commit details
    Browse the repository at this point in the history