8068887: java.lang.Throwable could use Collections.emptyList for suppressedException

Java.lang.Throwable could use Collections.emptyList for suppressedException

Reviewed-by: mchung, alanb, shade, redestad
This commit is contained in:
Vyom Tewari 2015-10-27 10:14:36 +05:30
parent 43fd9baef4
commit 392da5db2d

View File

@ -211,8 +211,7 @@ public class Throwable implements Serializable {
// 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));
private static final List<Throwable> SUPPRESSED_SENTINEL = Collections.emptyList();
/**
* The list of suppressed exceptions, as returned by {@link