Review Request: JDK-8187449: jdeps fails when an upgradeable module is upgraded with an automatic module
mandy chung
mandy.chung at oracle.com
Thu Sep 21 17:15:57 UTC 2017
On 9/19/17 9:54 AM, Paul Sandoz wrote:
>> On 18 Sep 2017, at 14:44, mandy chung <mandy.chung at oracle.com> 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);
>
Good idea. I revised it to use flatMap as above.
thanks
Mandy
More information about the core-libs-dev
mailing list