RFR 8189671: jlink should clearly report error when an automatic module is used

Alan Bateman Alan.Bateman at oracle.com
Fri Oct 20 07:16:39 UTC 2017


On 20/10/2017 04:53, Sundararajan Athijegannathan wrote:
> Hi,
>
> Updated to include location (when available) and formatting: 
> http://cr.openjdk.java.net/~sundar/8189671/webrev.02/
This looks right now. As jlink only supports packaged modules on the 
file system then each module should have a location. Another way to 
handle this case is to map it to "unknown", this should do it:

         cf.modules().stream()
                 .map(ResolvedModule::reference)
                 .filter(mref -> mref.descriptor().isAutomatic())
                 .findAny()
                 .ifPresent(mref -> {
                     String loc = 
mref.location().map(URI::toString).orElse("<unknown>");
                     ..
                 });

-Alan


More information about the jigsaw-dev mailing list