public final synchronized Throwable[] getSuppressed ()

Returns an array containing all of the exceptions that were suppressed, typically by the try-with-resources statement, in order to deliver this exception. If no exceptions were suppressed or suppression is, an empty array is returned. This method is thread-safe. Writes to the returned array do not affect future calls to this method.

Returns:  an array containing all of the exceptions that were suppressed to deliver this exception.

Since:  1.7