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

Lance Andersen lance.andersen at oracle.com
Tue Jan 3 22:50:57 UTC 2017


Hi Mandy

I saw the revised webrev.01 and it looks fine


> On Jan 3, 2017, at 5:45 PM, Mandy Chung <mandy.chung at oracle.com> wrote:
> 
>> 
>> On Jan 3, 2017, at 2:21 PM, Paul Sandoz <paul.sandoz at oracle.com> wrote:
>> 
>> 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);
>> 
> 
> I like this. Thanks for the suggestion.
>> 
>> ModuleTest
>>>> 
>> 153         System.err.println("Test: " + data.name());
>> 
>> Code dropping?
> 
> Left-over debugging code.  Removed.
> 
>> 
>> 
>> 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?
>> 
> 
> Hmm..  why the test is passing with “[]” in the command line?  I will check that out.  In any case, no need to modify this file.  I have reverted it.
> 
> Mandy
> 
>> 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

 <http://oracle.com/us/design/oracle-email-sig-198324.gif>
 <http://oracle.com/us/design/oracle-email-sig-198324.gif> <http://oracle.com/us/design/oracle-email-sig-198324.gif>
 <http://oracle.com/us/design/oracle-email-sig-198324.gif>Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037
Oracle Java Engineering 
1 Network Drive 
Burlington, MA 01803
Lance.Andersen at oracle.com <mailto:Lance.Andersen at oracle.com>





More information about the core-libs-dev mailing list