Javadocs specifying issue number
-
03-07-2021 - |
سؤال
I got a issue, that wants to change functionaly in my java code, issue number for example #41241.
What would be the correct Javadoc comment be to specify issue number, that requests this change?
Just that in future I know, why a certain function or line was changed/created?
المحلول
I don't write issue numbers into source code. This can get complicated when a method gets changed because of multiple issues...
I used to add the issue number to the SVN commit like: ISSUE-1234: added NPE check. Eclipse provides the useful feature Team -> Show Annotations
which shows for each line in which SVN commit it was changed and the commit comment. This adds more benefit as a comment in JavaDoc in my opinion.
لا تنتمي إلى StackOverflow