On 9/19/17 9:54 AM, Paul Sandoz wrote:
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);
Good idea. I revised it to use flatMap as above. thanks Mandy
