--- a/make/jdk/src/classes/build/tools/jdwpgen/ConstantNode.java Mon Sep 09 11:04:04 2019 -0700
+++ b/make/jdk/src/classes/build/tools/jdwpgen/ConstantNode.java Mon Sep 09 12:00:36 2019 -0700
@@ -55,8 +55,14 @@
void document(PrintWriter writer) {
//Add anchor to each constant with format <constant table name>_<constant name>
+ if (!(parent instanceof AbstractNamedNode)) {
+ error("Parent must be ConstantSetNode, but it's " + parent.getClass().getSimpleName());
+ }
+ String tableName = ((AbstractNamedNode)parent).name;
writer.println("<tr>"
- + "<th scope=\"row\">" + name
+ + "<th scope=\"row\">"
+ + "<span id=\"" + tableName + "_" + name + "\"></span>"
+ + name
+ "<td class=\"centered\">" + nameNode.value()
+ "<td>" + comment() + " "
+ "</tr>");
--- a/make/jdk/src/classes/build/tools/jdwpgen/ConstantSetNode.java Mon Sep 09 11:04:04 2019 -0700
+++ b/make/jdk/src/classes/build/tools/jdwpgen/ConstantSetNode.java Mon Sep 09 12:00:36 2019 -0700
@@ -62,9 +62,7 @@
writer.println("<th class=\"bold\" style=\"width: 65%\" scope=\"col\">Description");
writer.println("</tr>");
for (Node node : components) {
- ConstantNode n = (ConstantNode)node;
- writer.println("<span id=\"" + name + "_" + n.name + "\"></span>");
- n.document(writer);
+ node.document(writer);
}
writer.println("</table>");
}