RFR: 8174840: Elements.overrides does not check the return type of the methods
Joe Darcy
darcy at openjdk.org
Tue Jan 7 06:18:41 UTC 2025
On Sun, 5 Jan 2025 22:16:45 GMT, Nizar Benalla <nbenalla at openjdk.org> wrote:
> Please review this PR to clarify the documentation of `Elements.overrides` through an `@apiNote`, this PR is essentially a doc-only change. This PR supersedes https://github.com/openjdk/jdk/pull/22244.
>
> TIA.
test/langtools/tools/javac/processing/model/util/elements/overrides/S.java line 24:
> 22: */
> 23:
> 24: class S {
Following the usual conventions for annotation processing tests, it would be possible (and IMO desirable) for these declarations to be included in the same file as the test scaffolding, assuming S compiles.
If S does *not* compile, that should be documented.
test/langtools/tools/javac/processing/model/util/elements/overrides/TestOverrides.java line 39:
> 37: import static javax.lang.model.element.ElementKind.METHOD;
> 38:
> 39: /*
This comment would be helpful immediately before S and it would also be helpful for the various conditions being tested to be documented via comments.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22920#discussion_r1904952383
PR Review Comment: https://git.openjdk.org/jdk/pull/22920#discussion_r1904953475
More information about the compiler-dev
mailing list