Wednesday, June 17, 2009

javadoc @return not that helpful

A co-worker pointed this out to me after I suggested he "fix" his javadocs by using @return:

http://publicobject.com/2008/02/java-minutiae-return.html


So to ensure you have useful information in the JavaDoc method summary table, prefer a description of what your method returns over using @return, particularly if you're not providing any other descriptive text. In case you're wondering, this doesn't cost you anything in Eclipse... the auto-complete popup shows both the descriptive text and the @return text.