Community
Participate
Working Groups
To reproduce just paste this to your IDE ---8<--- /** * {@code class Test { * String a = ""; * }} * */ void bla() { } ---8<--- generates a JavaDoc: --- class Test { private String a; }} --- Notice: additional } at the end Upon closer look and adding some debug output to JavaDocContentAccess2 one notice that ASTNode representing @code has no content at all if there's another '{' inside the @code-block and so the final HTML produced is: -- <code></code> class Test { private String a; }}<dl><dt>Parameters:</dt><dd><b>args</b> </dd></dl> -- So I guess the real problem is in ASTParser because the @code-tag has no fragments attached to it. At least the JDK9 JavaDoc Tool allows opening braces inside @code - see eg http://download.java.net/java/jdk9/docs/api/javafx/scene/control/TreeTableView.html where the origin JavaDoc in code looks like --- * <pre>{@code * public class File { * private StringProperty name; * public void setName(String value) { nameProperty().set(value); } * public String getName() { return nameProperty().get(); } * public StringProperty nameProperty() { * if (name == null) name = new SimpleStringProperty(this, "name"); * return name; * } * * private LongProperty lastModified; * public void setLastModified(long value) { lastModifiedProperty().set(value); } * public long getLastModified() { return lastModifiedProperty().get(); } * public LongProperty lastModifiedProperty() { * if (lastModified == null) lastModified = new SimpleLongProperty(this, "lastModified"); * return lastModified; * } * }}</pre> ---
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.
You don't even need to create your own JavaDoc, you can hover over java.lang.String.split(String)