JDK-8068887 : java.lang.Throwable could use Collections.emptyList for suppressedException
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang
  • Priority: P5
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2015-01-13
  • Updated: 2016-06-13
  • Resolved: 2015-10-27
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b89Fixed
Related Reports
Relates :  
Description
Currently this is used as a default value for suppressedException:

    // Setting this static field introduces an acceptable
    // initialization dependency on a few java.util classes.
    private static final List<Throwable> SUPPRESSED_SENTINEL =
        Collections.unmodifiableList(new ArrayList<Throwable>(0));

Substituting Collections.unmodifiableList(new ArrayList<Throwable>(0)) with Collections.emptyList() indicate 3 fewer classes are loaded in a hello world program, and thus a very small startup footprint improvement. 

emptyList should be providing the same immutability and identity requirements.