Configuration checks on uses service is too strict

Remi Forax forax at univ-mlv.fr
Sat Nov 19 20:39:49 UTC 2016


Ok, i may have a found bug.

The spec says (section 1.1.3)
"The service interface may be declared in the current module or in another module. If the service interface is not declared in the current module, then the service interface must be accessible to code in the current module, or a compile-time error occurs. "
but the check in Resolve.checkExportSuppliers is this one:
    // uses S
    for (String service : descriptor1.uses()) {
        String pn = packageName(service);
        if (!packageToExporter.containsKey(pn)) {
            fail("Module %s does not read a module that exports %s",
                 descriptor1.name(), pn);
        }
     }
which doesn't take care of the case of a service interface declared in another module.

regards,
Rémi


More information about the jigsaw-dev mailing list