RFR 8168075: Custom system class loader + security manager + malformed policy file = recursive initialization

Mandy Chung mandy.chung at oracle.com
Mon Jan 23 20:06:42 UTC 2017

> On Jan 19, 2017, at 7:28 AM, Adam Petcher <adam.petcher at oracle.com> wrote:
> My last attempt to solve this problem didn't work because some classes needed for string formatting were not loaded by init level 3 in some cases. So I had to backtrack and try a different approach.
> This patch avoids localization and message formatting when the VM is not booted. In this case, non-localized messages are printed, and simplified message formatting code is used. Once the VM is loaded, messages are localized and formatted in the usual way.
> http://cr.openjdk.java.net/~apetcher/8168075/webrev.01/

This change looks fine.  This will make sure that MessageFormat will be used only after VM is booted.

MessageFormatting.java - missing @bug 

Nit: test/sun/security/util/Resources/ClassLoader
- perhaps renaming “ClassLoader” directory to “customSysLoader” to make it clear.


More information about the security-dev mailing list