ModuleLayer.Controller strongly references Module
Michał Kłeczek
michal at kleczek.org
Wed Nov 24 12:19:08 UTC 2021
Hi Alan,
(Disregard previous message - fat fingers)
Attached is a first draft of the patch:
1. Controller is created upon ML construction and returned from static ML.defineModules methods.
2. Created two controller liveness tests (they rely on System.gc() though - not sure if there are some tricks to test it reliably).
> On 22 Nov 2021, at 21:37, Alan Bateman <Alan.Bateman at oracle.com <mailto:Alan.Bateman at oracle.com>> wrote:
>>
> Assuming it's not exposed, and that there is no reference to the ML.Controller for the boot layer,
I am not sure I understand this. Do you mean ML.controller should be null for the boot layer?
This would require null check in static ML.defineModules methods to return new Controller for the boot layer (done only once during system init).
-- Michal
More information about the jigsaw-dev
mailing list