>From the doc:
"If a package is defined in both a named module and the unnamed module then
the package in the unnamed module is ignored. This preserves reliable
configuration even in the face of the chaos of the class path, ensuring
that every module still reads at most one module defining a given package.
If, in our example above, a JAR file on the class path contains a class
file named com/foo/bar/alpha/AlphaFactory.class then that file will never
be loaded, since the com.foo.bar.alpha package is exported by the
com.foo.bar module."

I would like some clarification. Correct me if wrong, but I think this
entire paragraph is really meant to be about the perspective from a
modularized JAR? If a module has package A, and the unnamed module has
package A, then of course the module's package A should win.

However, if it is meant to be absolute language, then I disagree.

The unnamed module should be coherent among itself. If the unnamed module
has package B and relies on classes from package A, it should still be able
to see its own package A. I don't think modules should be able to impact
how the unnamed module sees itself. That's a surprising situation.

Cheers,
Paul

Reply via email to