Community
Participate
Working Groups
Given the following code snippet: package mypackage; @MyAnnot(format = "<first-component><second-component>[<optional>]") public class MyClass { } @interface MyAnnot { public String format(); } The Javadoc view shows the following contents: mypackage.MyClass @MyAnnot(format="[]") Instead of mypackage.MyClass @MyAnnot(format="<first-component><second-component>[<optional>]") The contents inside < and > are interpreted as HTML elements and not displayed. Putting <a></a> and other elements inside the string contents of an annotation value will result in them being displayed as the corresponding HTML elements.
I found an interesting comment in org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover.addValue(StringBuffer, Object, boolean): // Note: To be bug-compatible with Javadoc from Java 5/6/7, we currently don't escape HTML tags in String-valued annotations. This was added during bug 357325, which, however, doesn't add more explanation. When testing with javadoc versions I found 1.7 to indeed have the bug, but in 1.8 this is fixed. Remains the question: is anybody interested in maintaining bug-compatibility at 1.7 and below?
(In reply to Stephan Herrmann from comment #1) > Remains the question: is anybody interested in maintaining bug-compatibility > at 1.7 and below? No. We should escape the HTML tags now.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.