Review Request: jdeps --require and --check should detect the specified module in the image

Paul Sandoz paul.sandoz at oracle.com
Tue Jan 3 22:21:53 UTC 2017


Hi,

Minor stuff:

JdepsTask
—

 845         private Comparator<Deque<Archive>> comparator() {
 846             Function<Deque<Archive>, String> name = deque -> deque.peekFirst().getName();
 847             ToIntFunction<Deque<Archive>> length = Deque::size;
 848
 849             return Comparator.comparing(name)
 850                              .thenComparingInt(length)
 851                              .thenComparing(this::toInversePath);
 852         }

If you like you can use a type witness, effectively the same declaration as for the function above:

return Comparator.<Deque<Archive>, String>
  comparing(deque -> deque.peekFirst().getName())
  .thenComparingInt(Deque::size)
  .thenComparing(this::toInversePath);


ModuleTest
—

 153         System.err.println("Test: " + data.name());

Code dropping?


 154         // jdeps --module-path <modulepath> -m root paths
 155         String cmd = String.format("jdeps --module-path %s --add-modules %s %s%n",
 156             MODS_DIR, roots.stream().collect(Collectors.joining(",")),
 157             Arrays.toString(paths));

Is the use of Arrays.toString correct here?

Paul.

> On 3 Jan 2017, at 13:03, Mandy Chung <mandy.chung at oracle.com> wrote:
> 
> http://cr.openjdk.java.net/~mchung/jdk9/webrevs/8172212/webrev.00/
> 
> This is a simple patch that fixes jdeps in analyzing modules linked in the image. It fixes the following commands which are currently not working properly.
> 
> $ jdeps -I -—require jdk.compiler
> $ jdeps -—check jdk.compiler
> 
> This patch changes not to require classes or —-add-modules be specified, if it’s a module in the image.  This patch also fixes when —-list-deps is used with -m and prints the result if the source is a named module.
> 
> Mandy



More information about the core-libs-dev mailing list