On Wed, 14 May 2025 08:18:39 GMT, Timofei Pushkin <tpush...@openjdk.org> wrote:

>> If a base class is package-private then its subclasses should have the same 
>> package name and defining class loader, otherwise `IllegalAccessError` is 
>> thrown when linking a subclass. Currently when dumping a static archive 
>> separate `URLClassLoader`s are used for each unregistered classes' source. 
>> Thus if two unregistered classes, a package-private base class and a sub 
>> class, from the same package reside in different sources 
>> `IllegalAccessError` will be thrown when linking the sub class. This can be 
>> unexpected because the app could have used a single class loader for both 
>> classes and thus not have seen the error — see `DifferentSourcesApp.java` 
>> from this patch for an example of such app.
>> 
>> This patch fixes the issue by using a single class loader for all 
>> unregistered classes. CDS does not allow classes with the same name making 
>> such solution possible.
>
> Timofei Pushkin has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Make supertype obstruction check easier to understand

@TimPushkin 
Your change (at version a3b7dd962a0b5ee32395c2b08232bf1cbd0ef0f9) is now ready 
to be sponsored by a Committer.

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

PR Comment: https://git.openjdk.org/jdk/pull/24223#issuecomment-2883940576

Reply via email to