[JIRA] Created: (LBCLASSIC-276) Add support for Throwable.getSuppressed()

Add support for Throwable.getSuppressed() ----------------------------------------- Key: LBCLASSIC-276 URL: http://jira.qos.ch/browse/LBCLASSIC-276 Project: logback-classic Issue Type: New Feature Affects Versions: 0.9.29 Reporter: Joern Huxhorn Assignee: Logback dev list See http://old.nabble.com/Java-7-automatic-resource-management-and-suppressed-ex... Java SE 7 adds a new feature to Throwable. http://www.oracle.com/technetwork/articles/java/trywithresources-401775.html explains this in detail. Relevant for us is the following new method: Throwable[] getSuppressed() It can optionally contain a list of Throwables that were suppressed by the new Java SE 7 try-with-resource functionality. We need to add support for that method be means of reflection. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-276?page=com.atlassian.jira.plugin.syste... ] Joern Huxhorn commented on LBCLASSIC-276: ----------------------------------------- Implemented basic support. Please see https://github.com/ceki/logback/pull/16
Add support for Throwable.getSuppressed() -----------------------------------------
Key: LBCLASSIC-276 URL: http://jira.qos.ch/browse/LBCLASSIC-276 Project: logback-classic Issue Type: New Feature Affects Versions: 0.9.29 Reporter: Joern Huxhorn Assignee: Logback dev list
See http://old.nabble.com/Java-7-automatic-resource-management-and-suppressed-ex... Java SE 7 adds a new feature to Throwable. http://www.oracle.com/technetwork/articles/java/trywithresources-401775.html explains this in detail. Relevant for us is the following new method: Throwable[] getSuppressed() It can optionally contain a list of Throwables that were suppressed by the new Java SE 7 try-with-resource functionality. We need to add support for that method be means of reflection.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-276?page=com.atlassian.jira.plugin.syste... ] Joern Huxhorn commented on LBCLASSIC-276: ----------------------------------------- Just wanted to ask if my pull-request contains any issues preventing a merge. Java 7 has been released over a month ago and I'd really like to see this added to 0.9.30.
Add support for Throwable.getSuppressed() -----------------------------------------
Key: LBCLASSIC-276 URL: http://jira.qos.ch/browse/LBCLASSIC-276 Project: logback-classic Issue Type: New Feature Affects Versions: 0.9.29 Reporter: Joern Huxhorn Assignee: Logback dev list
See http://old.nabble.com/Java-7-automatic-resource-management-and-suppressed-ex... Java SE 7 adds a new feature to Throwable. http://www.oracle.com/technetwork/articles/java/trywithresources-401775.html explains this in detail. Relevant for us is the following new method: Throwable[] getSuppressed() It can optionally contain a list of Throwables that were suppressed by the new Java SE 7 try-with-resource functionality. We need to add support for that method be means of reflection.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-276?page=com.atlassian.jira.plugin.syste... ] Joern Huxhorn commented on LBCLASSIC-276: ----------------------------------------- Just a small status update. The following code needs another look for full support of getSuppressed(): ch.qos.logback.classic.db.DBAppender.insertThrowable ch.qos.logback.classic.html.DefaultThrowableRenderer.render ch.qos.logback.classic.net.SyslogAppender.postProcess ch.qos.logback.classic.pattern.RootCauseFirstThrowableProxyConverter.subjoinRootCauseFirst ch.qos.logback.classic.pattern.ThrowableProxyConverter.throwableProxyToString I previously added support to ch.qos.logback.classic.spi.ThrowableProxyUtil.asString but, unfortunately, this method isn't used in any of the above code. I'm not sure if printing of suppressed exceptions should be optional in the two ProxyConverter implementations and if so, how to implement that behavior . Concerning DefaultThrowableRenderer and SyslogAppender, I'd guess that they should just call asString instead of reimplementing it.
Add support for Throwable.getSuppressed() -----------------------------------------
Key: LBCLASSIC-276 URL: http://jira.qos.ch/browse/LBCLASSIC-276 Project: logback-classic Issue Type: New Feature Affects Versions: 0.9.29 Reporter: Joern Huxhorn Assignee: Logback dev list
See http://old.nabble.com/Java-7-automatic-resource-management-and-suppressed-ex... Java SE 7 adds a new feature to Throwable. http://www.oracle.com/technetwork/articles/java/trywithresources-401775.html explains this in detail. Relevant for us is the following new method: Throwable[] getSuppressed() It can optionally contain a list of Throwables that were suppressed by the new Java SE 7 try-with-resource functionality. We need to add support for that method be means of reflection.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

participants (2)
-
Joern Huxhorn (JIRA)
-
Marcin Domański (JIRA)