RFR 8068887 : java.lang.Throwable could use Collections.emptyList for suppressedException
Alan Bateman
Alan.Bateman at oracle.com
Mon Oct 12 15:56:35 UTC 2015
On 12/10/2015 16:09, Vyom Tewari wrote:
> Hi All,
>
> Please review my changes for below bug.
>
> Bug: JDK-8068887 : java.lang.Throwable could use
> Collections.emptyList for suppressedException
> Webrev: http://cr.openjdk.java.net/~vtewari/8068887/webrev.00/webrev/
>
> This change ensure that fewer classes are loaded in a simple(hello
> world) program, and thus a very very small start-up footprint
> improvement.
>
This looks okay (just missing the a space in =Collections) but I'm
curious if it does actual reduce the number of classes loaded at
startup. I would think ArrayList and unmodifiable list would be popular.
(Your patch makes me wonder if Collections.unmodifiableXXX should return
emptyXXX when the collection is empty).
-Alan
More information about the core-libs-dev
mailing list