Review Request: JDK-8187449: jdeps fails when an upgradeable module is upgraded with an automatic module
Paul Sandoz
paul.sandoz at oracle.com
Thu Sep 21 17:29:40 UTC 2017
> On 21 Sep 2017, at 10:15, mandy chung <mandy.chung at oracle.com> wrote:
>
>
>
> 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.
>
Ok, +1
Paul.
More information about the core-libs-dev
mailing list