RFR: 8236075: Minor bootstrap improvements

Mandy Chung mandy.chung at oracle.com
Mon Jan 20 21:00:36 UTC 2020



On 1/20/20 12:46 PM, Alan Bateman wrote:
> On 20/01/2020 15:54, Claes Redestad wrote:
>> Hi,
>>
>> some minor cleanups and enhancements in and around java.lang.ClassLoader
>> which add up to a small startup improvement:
>>
>> - Remove use of Vector/Hashtable from ClassLoader, along with a few
>>   other improvements/modernizations.
>> - Refactor ClassLoader::sys_paths/user_paths so that they're initialized
>> lazily but also published safely
>>
>> Webrev: http://cr.openjdk.java.net/~redestad/8236075/open.01/
>> Bug:    https://bugs.openjdk.java.net/browse/JDK-8236075
>>
> I went through the changes too and they mostly look good to me. I have 
> the same reaction to Mandy about the duplication of parsePath in the 
> unix and macos versions of ClassLoaderHelper. The outlier is 
> mapAlternativeName and maybe that might move elsewhere in time but I 
> think what you have is okay.
>
> For userPath/sysPath then I think those methods were okay when they 
> were in ClassLoader (and close to their usage) but I think we should 
> choose better names for the methods in StaticProperty, also better 
> names for USER_PATH and SYS_PATH because they don't obvious map to the 
> values of java.library.path and sun.boot.library.path. What would you 
> think about rename them so that the usages in ClassLibrary.LibraryPath 
> are StaticProperty.javaLibraryPath() and 
> StaticProperty.sunBootLibrayPath() ?
>

I like your suggested names, very clear what properties they are.

Thanks
Mandy


More information about the core-libs-dev mailing list