Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8142809 | emb-9 | Vyom Tewari | P5 | Resolved | Fixed | team |
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.
// 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.
- backported by
-
JDK-8142809 java.lang.Throwable could use Collections.emptyList for suppressedException
- Resolved
- relates to
-
JDK-6911258 Project Coin: Add essential API support for Automatic Resource Management (ARM) blocks
- Closed