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

vyom vyom.tewari at oracle.com
Thu Oct 15 02:23:20 UTC 2015


Hi All,

Please find the updated code, i fixed the missing space.

http://cr.openjdk.java.net/~vtewari/8068887/webrev.0.1/webrev/ 
<http://cr.openjdk.java.net/%7Evtewari/8068887/webrev.0.1/webrev/>

there are 3 less class loaded(455 vs 452) for simple hello world 
program.I just simply count numbers of lines in output so actual loaded 
classes may differ but difference will remain same. Please find below 
the diff

#######################################

diff withfix.txt wfix.txt
217a218
 > [Loaded java.util.ArrayList from 
/home/vytewari/source/jdk/jdk9/build/linux-x86_64-normal-server-release/jdk/modules/java.base]
223a225,227
 > [Loaded java.util.Collections$UnmodifiableCollection from 
/home/vytewari/source/jdk/jdk9/build/linux-x86_64-normal-server-release/jdk/modules/java.base]
 > [Loaded java.util.Collections$UnmodifiableList from 
/home/vytewari/source/jdk/jdk9/build/linux-x86_64-normal-server-release/jdk/modules/java.base]
 > [Loaded java.util.Collections$UnmodifiableRandomAccessList from 
/home/vytewari/source/jdk/jdk9/build/linux-x86_64-normal-server-release/jdk/modules/java.base]
357d360
< [Loaded java.util.ArrayList from 
/home/vytewari/source/jdk/jdk9/build/linux-x86_64-normal-server-release/jdk/modules/java.base]

#######################################

Thanks,
Vyom

On Monday 12 October 2015 04:54 PM, Mandy Chung wrote:
>> On Oct 12, 2015, at 8:09 AM, Vyom Tewari <vyom.tewari at oracle.com> 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.
> Looks okay to me (as Alan pointed out, a space is missing in “=Collections.emptyList”.   I’m curious to see the diff of -verbose:class before and after.
>
> Mandy
>




More information about the core-libs-dev mailing list