On Thu, 17 Sep 2026 00:44:04 GMT, David Holmes <[email protected]> wrote:
>> The name isn't great but I'm not sure what else to call it.
>>
>> The test is asserting that the class is present in the heap dump even though
>> the "classes" field has been removed:
>>
>> JavaClass classLoaderClass =
>> snapshot.findClass("java.lang.ClassLoader");
>> boolean hasClasses = Arrays.stream(classLoaderClass.getFields())
>> .anyMatch(field ->
>> field.getName().equals("classes"));
>> Asserts.assertFalse(hasClasses);
>
> `ClassLoaderDefinedClassesTest` ?
FWIW I would not include that assertion that the field is no longer present.
The key point is that we can find the classes from the classloader.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/32890#discussion_r4032059680