JDK-5082928 : Malformed tag throws error malformed_html_link_tag due to message not found in resource file
  • Type: Bug
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 5.0,5.0u4,6
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS:
    generic,other,linux,solaris_9,windows_2000,windows_xp generic,other,linux,solaris_9,windows_2000,windows_xp
  • CPU: generic,x86,sparc
  • Submitted: 2004-08-05
  • Updated: 2014-05-05
  • Resolved: 2005-11-12
JDK 6
6 b61Fixed
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Description
Aha, I have attached the offending Java file.
Here is the offending snippet:

/**
 * Bean class to handle our extensions to the Struts <action> tag.
 * @exclude
 */

If I escape the open-angle-bracket as so...

/**
 * Bean class to handle our extensions to the Struts &lt;action> tag.
 * @exclude
 */

...then the java.util.MissingResourceException no longer occurs.

Note that snippets like this

...<exceptions>...
...<forward>...

don't cause an exception in the first place.

So it seems to be related to the link-resembling sequence

...<a...

Here is the error I was getting:

  [javadoc] Constructing Javadoc information...
  [javadoc] Standard Doclet version 1.5.0-beta2
  [javadoc] Building tree for all the packages and classes...
  [javadoc] Internal error: package sets don't match: [] with: null
  [javadoc] Internal error: package sets don't match: [] with: null
  [javadoc] Internal error: package sets don't match: [] with: null
  [javadoc] Internal error: package sets don't match: [] with: null
  [javadoc] Internal error: package sets don't match: [] with: null
  [javadoc] Internal error: package sets don't match: [] with: null
  [javadoc] Internal error: package sets don't match: [] with: null
  [javadoc] Internal error: package sets don't match: [] with: null
  [javadoc] Internal error: package sets don't match: [] with: null
  [javadoc] Internal error: package sets don't match: [] with: null
  [javadoc] Internal error: package sets don't match: [] with: null
  [javadoc] Internal error: package sets don't match: [] with: null
  [javadoc] Internal error: package sets don't match: [] with: null
  [javadoc] Internal error: package sets don't match: [] with: null
  [javadoc] Internal error: package sets don't match: [] with: null
  [javadoc] Internal error: package sets don't match: [] with: null
  [javadoc] Internal error: package sets don't match: [] with: null
  [javadoc] Internal error: package sets don't match: [] with: null
  [javadoc] Internal error: package sets don't match: [] with: null
  [javadoc] Internal error: package sets don't match: [] with: null
  [javadoc] Internal error: package sets don't match: [] with: null
  [javadoc] Internal error: package sets don't match: [] with: null
  [javadoc] Internal error: package sets don't match: [] with: null
  [javadoc] Internal error: package sets don't match: [] with: null
  [javadoc] Internal error: package sets don't match: [] with: null
  [javadoc] Internal error: package sets don't match: [] with: null
  [javadoc] Internal error: package sets don't match: [] with: null
  [javadoc] Internal error: package sets don't match: [] with: null
  [javadoc] Building index for all the packages and classes...
  [javadoc] java.util.MissingResourceException: Can't find resource for bundle com.sun.tools.doclets
.formats.html.resources.standard, key doclet.malformed_html_link_tag
  [javadoc]     at java.util.ResourceBundle.getObject(ResourceBundle.java:326)
  [javadoc]     at java.util.ResourceBundle.getString(ResourceBundle.java:286)
  [javadoc]     at com.sun.tools.doclets.internal.toolkit.util.MessageRetriever.getText(MessageRetriever.java:114)
...


Name: rmT116609			Date: 08/26/2004


A DESCRIPTION OF THE PROBLEM :
Getting  exception from javadoc on  malformed link in javadoc when building javadoc for Apache Derby project.


(Review ID: 300991)
======================================================================

Comments
EVALUATION I am currently testing a fix for this bug. The standard doclet scans the code for relative links and tries to redirect them so that they are not are broken when they appear places outside the class documentation. The scan pattern is "<a" so tags like "<action> fool the doclet into thinking this is a bad link. The scan pattern should at least be "<a ". It would be better to have a regular expression, but not absolutely necessary.
18-09-2005

CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: dragon
28-08-2004

WORK AROUND If you get the error: java.util.MissingResourceException: Can't find resource for bundle com.sun.tools.doclets .formats.html.resources.standard, key doclet.malformed_html_link_tag then run javadoc over small sets of packages or classes to isolate which file this error is in. Then look for a malformed HTML tag and fix it.
28-08-2004

SUGGESTED FIX Sorry, this is indeed a bug. This would fix the problem in HtmlDocletWriter. Change: configuration.getDocletSpecificMsg().warning(doc.position(), "doclet.malformed_html_link_tag", text); To: configuration.root.printWarning( doc.position(), configuration.getText("doclet.malformed_html_link_tag", text)); The getText() method first checks the doclet resource file. If the key is not found, it falls back to the toolkit resource file. I shouldn't have used getDocletSpecificMsg(). ###@###.###
28-08-2004

EVALUATION This key is not being found: doclet.malformed_html_link_tag in com.sun.tools.doclets.formats.html.resources.standard It's actually at a different location: (using grep to find) com/sun/tools/doclets/internal/toolkit/resources/doclets.properties: doclet.malformed_html_link_tag=<a> tag is malformed:\n"{0}" It looks like a bug we need to fix in the tool. See suggested fix for solution ###@###.### 2004-08-04
04-08-2004