8211825: ModuleLayer.defineModulesWithXXX does not setup delegation when module reads automatic module

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

8211825: ModuleLayer.defineModulesWithXXX does not setup delegation when module reads automatic module

Alan Bateman

This is the issue that Thomas Watson brought up here on Friday. If
defineModulesWithXXX is used to create a module layer and it contains a
module that reads an automatic module mapped to a different class loader
(same layer or parent layer) then the class loader delegation isn't
setup.  This scenario requires special handling the module descriptor
for automatic modules don't declare any exports.

The changes to fix the issue are here:
   http://cr.openjdk.java.net/~alanb/8211825/webrev/index.html

Note that

-Alan
Reply | Threaded
Open this post in threaded view
|

Re: 8211825: ModuleLayer.defineModulesWithXXX does not setup delegation when module reads automatic module

Mandy Chung


On 10/8/18 7:46 AM, Alan Bateman wrote:

>
> This is the issue that Thomas Watson brought up here on Friday. If
> defineModulesWithXXX is used to create a module layer and it contains
> a module that reads an automatic module mapped to a different class
> loader (same layer or parent layer) then the class loader delegation
> isn't setup.  This scenario requires special handling the module
> descriptor for automatic modules don't declare any exports.
>
> The changes to fix the issue are here:
>   http://cr.openjdk.java.net/~alanb/8211825/webrev/index.html

This change looks good.

Mandy