RFR: 8261625: Add `Elements.isAutomaticModule(ModuleElement)` [v2]
Joe Darcy
darcy at openjdk.java.net
Thu Apr 8 06:26:04 UTC 2021
On Thu, 8 Apr 2021 01:50:02 GMT, Vicente Romero <vromero at openjdk.org> wrote:
>> Joe Darcy has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision:
>>
>> - Respond to review feedback.
>> - Merge branch 'master' into 8261625
>> - Add test coverage.
>> - Merge branch 'master' into 8261625
>> - 8261625
>
> test/langtools/tools/javac/processing/model/util/elements/TestIsAutomaticMod.java line 2:
>
>> 1: /*
>> 2: * Copyright (c) 2006, 2021, Oracle and/or its affiliates. All rights reserved.
>
> 2006 can be removed
I copied a file from 2006 and then edited the result, hence I started with the 2006 year.
> test/langtools/tools/lib/toolbox/JavacTask.java line 341:
>
>> 339: * @return the result of calling {@code run}
>> 340: */
>> 341: public Result run(Expect expect, Processor... procs) {
>
> I would prefer to add a new method to this class, something in the lines of:
> public JavacTask processors(Processor... procs) {
> this.procs = List.of(procs);
> return this;
> }
>
> which I think is more in the spirit of the existing API, then you won't need to add the two new versions of the `run` method
Added as suggested; thanks.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3382
More information about the compiler-dev
mailing list