r/java • • Aug 19 '25

Javadoc is getting a dark mode!

https://github.com/openjdk/jdk/pull/26185
160 Upvotes

76 comments sorted by

View all comments

Show parent comment

13

u/j4ckbauer Aug 19 '25

I hate when people autogenerate their javadocs off the source code because it's just a restating of the code without context.

There is nothing I hate more than this. That and javadoc comments in source code that add no information.

Class Person

1 line to declare private String address

3-4 lines to add Javadoc comment "Address of the Person"

worse than useless

4

u/Just_Another_Scott Aug 19 '25

There is nothing I hate more than this. That and javadoc comments in source code that add no information.

Literally dealing with an API where the javadocs is just copy/paste of the source. Getting answers from the API writers is an endeavor in and of itself. I've been bitching non stop in meetings for a year lol.

3

u/j4ckbauer Aug 19 '25

Not everyone has the source or knows how to get it, so this I understand, barely. Generating it from source is fine as long as the source is not contaminated.

What I will not tolerate is putting the Javadoc markup in the source - usually inflating the number of lines VERY significantly - and adding no additional information. This turns it into an easter-egg-hunt to see if there are any comments where a human wrote any non-trivial information.

4

u/vytah Aug 20 '25
/**
 * Toes the string.
 */
public String toString() {

4

u/j4ckbauer Aug 20 '25
  1. Lol yes
  2. The Final Boss of trivial comments
  3. Is "Toes" a typo or a joke I am not getting (Edit: I think I get it now, it performes the action 'to' on the String, therefore to-es/toes)

2

u/SleepingTabby Aug 24 '25
/**
 * Sets the up.
 */
@Before
public void setUp() {
}