any way to "fix" existing javadoc?

I have some code where the javadoc is no longer in sync with the code. Thankfully, I can get IntelliJ to point that as an error. I am trying to "fix" the javadoc where the existing method signature can be used and the existing javadoc can be modified so that non-existing params can be removed, new params can be added and other left untouched.

This seems to happen if I change the method signature but I cannot "change" the method signature without changing anything. I have to add a param and then delete that param of this to work.

Any suggestions/recommendations? I am using 3103.

1 comment

I usually employ the "brute force" method. I add a new empty line between the last line of the existing javadoc comment and the method signature line, then create a new javadoc comment letting IDEA perform the code completion. This should add the proper parameters. Then, I manually merge the existing comment with the new comment.

This isn't ideal when many changes need to be made, but if you have a few, it should work.

HTH

0

Please sign in to leave a comment.