> On 18 Sep 2017, at 14:44, mandy chung <[email protected]> wrote:
>
> http://cr.openjdk.java.net/~mchung/jdk10/webrevs/8187449/webrev.00/
>
JdepsConfiguration
—
288 // is this module from the system module path?
289 boolean isSystem = false;
290 if (system.find(mn).isPresent()) {
291 URI loc = system.find(mn).get().location().orElse(null);
292 isSystem = location.equals(loc);
293 }
I believe you can use flatMap so we transform from one Optional domain to
another e.g.:
URI loc = system.find(mn).flatMap(<Class>::location).orElse(null);
boolean isSystem = location.equals(loc);
Or:
boolean isSystem = system.find(mn).flatMap(<Class>::location).map(l ->
l.equals(loc)).orElse(Boolean.FALSE);
Up to you.
Paul.
> jdeps throws InternalError if a JDK module is not an explicit module. This
> check should only apply to JDK modules loaded from the system image. This
> patch will relax the check for upgradeable modules that may be an automatic
> module. For example, the following command should work.
>
> $ jdeps --upgrade-module-path javax.transaction-api-1.2.3-SNAPSHOT.jar -m
> java.transaction
>
> Mandy