To a certain extent, we are talking about "style." However, let's see:
List<Task> getTasksForUser(Integer userId);
Some people argue that there is some merit in
- a human read description that tells you what the method does
- More info with @ param / @ return tags
You can, for example, rewrite this as:
List<Task> getTasksForUser(Integer userId);
So, in your example, there is a place to use additional tags to provide virtually different information: each line in my version performs a specific purpose, while your example simply repeats the same information, although it uses a slightly different wording.
But, as said, in the end, it is a matter of style, and the key point is that you should choose the โstyleโ that you (and your peers) consider the most useful for your context.
And note: instead of repeating the โobviousโ things over and over, a more useful comment might look something like this:
List<Task> getTasksForUser(Integer userId);
Which is basically โmyโ preferred style - go with a single @return line. But instead, pay attention to such important aspects as: this method throws this exception at runtime if ...
One final note: the presence of "empty" @param lines (which give only the parameter name) is a clear no-go. These lines tell you nothing , but you still have to spend time reading and ignoring it . Such things are waste . Avoid this.