Review Request: JDK-8179950: Custom system class loader using Enum.valueOf in its initialization triggers java.lang.InternalError
mandy.chung at oracle.com
Tue May 9 17:25:36 UTC 2017
> On May 9, 2017, at 10:08 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
> On 09/05/2017 17:58, Mandy Chung wrote:
>> This is a regression caused by JDK-8020801 that the initialization of a custom system class loader hits a code path that checks if a class is loaded by the platform class loader. Such code path should not call ClassLoader::getSystemClassLoader since the system class loader is being initialized.
>> The fix is simple and uses jdk.internal.loader.ClassLoaders.platformClassLoader() instead.
> The fix looks fine. For the test then I would rename initCustomSystemLoader to something like testEnumValueOf as it's a very specific sub-test. Also I could imagine adding more sub-tests to this too.
Good idea. I updated webrev.00 in place.
That’s exactly what I have in mind in writing this test to add more subtests to cover code paths - we need to have better test coverage for custom system class loader.
More information about the core-libs-dev