On Wed, 12 Aug 2026 20:12:37 GMT, Matias Saavedra Silva <[email protected]> 
wrote:

>> I think I understand Alan's question.  His question is any class loader 
>> might do something like skip normal delegation and call 
>> MyFooOtherClassLoader.getResource(), so you need to know that it's a normal 
>> delegating class loader.
>> So builtin_class_loaders - like the AppClassLoader (ie the normal system 
>> loader) will have a normal delegation and not bypass it to find something 
>> strange.  Did I get this right?
>> Maybe don't need an assert like
>> assert(SystemDictionaryShared::is_builtin_loader(loader_data) because this 
>> case always comes through.
>> Maybe a comment would suffice.
>
> This code path only exists inside 
> `ClassLoader::record_result_for_builtin_loader` so I think we're safe here.

We should add `assert(SystemDictionaryShared::is_builtin_loader(loader_data)` 
in case someone uses this function for other loaders without knowing the 
limitations. E.g., @ashu-mehra 's prototype of customer loader support may be 
affected.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/32087#discussion_r3770192746

Reply via email to