changeset 12963:6d88d51aa352

8068887: java.lang.Throwable could use Collections.emptyList for suppressedException Summary: java.lang.Throwable could use Collections.emptyList for suppressedException Reviewed-by: mchung, alanb, shade, redestad
author vtewari
date Tue, 27 Oct 2015 10:14:36 +0530
parents 0f6c981f1cbf
children 8271f42bae4a
files src/java.base/share/classes/java/lang/Throwable.java
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/lang/Throwable.java	Tue Oct 27 09:09:37 2015 +0100
+++ b/src/java.base/share/classes/java/lang/Throwable.java	Tue Oct 27 10:14:36 2015 +0530
@@ -211,8 +211,7 @@
 
     // 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