Review request - simple fix in jigsaw linker

Mandy Chung mandy.chung at oracle.com
Tue May 24 14:25:01 PDT 2011



This is a fix in the Linker and PathLinker to check if a supplying context and
the requesting context are different before adding to the remote suppliers list.

The jdk modules have workaround this bug in the past by making the jdk modules
to always require local of its required modules.  Otherwise, the resolver will
complain about a package defined in one context but exported by itself
as that context is a supplier to itself.  This is one example of the exception:

org.openjdk.jigsaw.ConfigurationException: Package javax.crypto.interfaces
defined in +jdk.boot+sun.charsets+sun.corba+sun.desktop+sun.jaas+sun.jaxp+sun.jndi+sun.jsse+sun.jta+sun.localedata+sun.logging+sun.management+sun.resources+sun.rmi
but exported by supplier +jdk.boot+sun.charsets+sun.corba+sun.desktop+sun.jaas+sun.jaxp+sun.jndi+sun.jsse+sun.jta+sun.localedata+sun.logging+sun.management+sun.resources+sun.rmi

Webrev at:
    http://cr.openjdk.java.net/~mchung/jigsaw/webrevs/jigsaw-linker-fix/

I added a test case that shows this configuration exception without
this fix:

-- local-same-context
| Configuring [x@=1] using library mock-library
|   resolving ROOT requires x@=1
|   - trying x at 1
|   -- resolving x at 1 requires ll@=1
|   --- trying ll at 1
|   ---- resolving ll at 1 requires local lc@=1
|   ----- trying lc at 1
|   ------ resolving x at 1 requires lr@=1
|   ------- trying lr at 1
|   -------- resolving lr at 1 requires local lc@=1
|   --------- resolving lr at 1 requires local x
|   propagating suppliers (pass 1)
FAIL: Unexpected failure: Package p defined in +lc+ll+lr+x but exported by supplier +lc+ll+lr+x

Mandy




More information about the jigsaw-dev mailing list