JavaDoc and JDK 5.0
Thursday, July 20th, 2006Well it seems I stumbled upon a JDK bug related to the standard doclet. When a URL is found in the JavaDoc the doclet checks if the URL is valid. Not very unlogical. The parsing however is strange: if the doclets finds anything in the JavaDoc that starts with <a is must end with </a>.
So?
/**
* Map<Address, String> ...
*/
This is officially correct JavaDoc but the doclet will crash. The doclet has two bugs:
- The doclet can not handle generics snippits in JavaDoc.
- The doclet can not find it’s message bundle for reporting errors.
The doclet parses this comment and fails trying to show a message that the URL is malformed but it can not find the key, thus throwing a java.util.MissingResourceException.
Workaround is to avoid using <a within JavaDoc unless is it a correct URL.