On Sun, 23 Feb 2025 11:32:41 GMT, Robert Stupp <rst...@openjdk.org> wrote:

> Concurent calls to `ClassLoader.definePackage()` can yield 
> `IllegalArgumentException`s if the package is already defined. Some built-in 
> class loaders, like `URLClassLoader`, already handle this case, but custom 
> class loaders (would) have to handle this case.
> 
> This change updates the logic of `CL.definePackage` to not throw an IAE if 
> the "redefined" package is equal to the already defined one.
> 
> Tests added in `jdk/java/lang/Package/PackageDefineTest.java` (+ pulling up 
> the `TestClassLoader` from `PackageDefineTest`).

This pull request has been closed without being integrated.

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

PR: https://git.openjdk.org/jdk/pull/23737

Reply via email to