Review Request JDK-8228336: Refactor native library loading implementation
Daniel Fuchs
daniel.fuchs at oracle.com
Wed Mar 11 17:25:32 UTC 2020
Hi Mandy,
On 11/03/2020 16:10, Alan Bateman wrote:
>> I'm open to other suggestion. This helper method avoids the call to
>> doPrivileged when security manager is enabled and I think it's okay to
>> add this helper method in sun.security.action package.
> BootLoader defines methods to correspond to the methods defined by
> ClassLoader so I don't think the loadLibrary method was too bad.
> Moreover it was very clear when calling BootLoader.loadLibrary that it
> would attempt to load it from the system path. I don't object to putting
> this in sun.security.action but it doesn't feel. If it is moved but I
> think we'll need to find better names so it's clear in the 20+ places
> where it used (and also avoid the temptation to use it in the modules
> that aren't mapped to the boot loader).
That's probably a stupid question but wouldn't it have been simpler to
redefine BootLoader::loadLibrary(String) to call the new
LoadLibraryAction rather than removing the method altogether?
best regards,
-- daniel
>
> -Alan
More information about the core-libs-dev
mailing list