On 4/22/2020 4:32 PM, Dan Smith wrote:
Another module system sanity check: is mutual recursion allowed between unnamed modules of different loaders? (Pre-9, mutual recursion between different loaders was certainly possible...)
Yes. Anything that was possible with class loaders on JDK 8 is still possible on JDK 9+. Class loaders in JDK 9+ are free to mutually delegate for classes that are in unnamed modules rather than in layer-defined run-time modules. We even arrange a complete readability graph between those unnamed modules -- "Every unnamed module reads every run-time module." -- in case class C in one unnamed module attempts to access (possibly via a `Class` object, so no need for c.p. resolution) class D in another unnamed module, without any concern or distress over the higher-level story that C refers to D and D refers to C.
Alex
