RFR: JDK-8258602: JavaDoc field summary does not indicate final modifier [v2]
Jonathan Gibbons
jjg at openjdk.java.net
Fri Apr 30 03:27:51 UTC 2021
On Tue, 27 Apr 2021 19:00:10 GMT, Hannes Wallnöfer <hannesw at openjdk.org> wrote:
> > Hi Hannes, out of curiosity - for a final class, will all members (or none) appear final in the generated documentation? Or will it depend on whether a redundant `final` keyword appears in the code or not? From your code changes, I guess it will be the latter - which makes me wonder whether we want to go that far in the API documentation. Maybe `final` should be omitted for members of a final class.
>
> Yes, `final` will appear as it is used in the source code for method summaries of final classes. In my mind this is acceptable, analogous to both ways being allowed in the source code.
This seems surprising and maybe questionable, since in other places, javadoc tries to present a normalized view of modifiers. But, I agree it is in line with existing behavior, and this issue is not about changing that behavior at this time.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3716
More information about the javadoc-dev
mailing list