diff --git a/make/jdk/src/classes/build/tools/jdwpgen/ConstantNode.java b/make/jdk/src/classes/build/tools/jdwpgen/ConstantNode.java index 6dcf7cc381a..064bec62a37 100644 --- a/make/jdk/src/classes/build/tools/jdwpgen/ConstantNode.java +++ b/make/jdk/src/classes/build/tools/jdwpgen/ConstantNode.java @@ -55,8 +55,14 @@ class ConstantNode extends AbstractCommandNode { void document(PrintWriter writer) { //Add anchor to each constant with format _ + if (!(parent instanceof AbstractNamedNode)) { + error("Parent must be ConstantSetNode, but it's " + parent.getClass().getSimpleName()); + } + String tableName = ((AbstractNamedNode)parent).name; writer.println("" - + "" + name + + "" + + "" + + name + "" + nameNode.value() + "" + comment() + " " + ""); diff --git a/make/jdk/src/classes/build/tools/jdwpgen/ConstantSetNode.java b/make/jdk/src/classes/build/tools/jdwpgen/ConstantSetNode.java index 2d62318fc69..39c8ae36cee 100644 --- a/make/jdk/src/classes/build/tools/jdwpgen/ConstantSetNode.java +++ b/make/jdk/src/classes/build/tools/jdwpgen/ConstantSetNode.java @@ -62,9 +62,7 @@ class ConstantSetNode extends AbstractNamedNode { writer.println("Description"); writer.println(""); for (Node node : components) { - ConstantNode n = (ConstantNode)node; - writer.println(""); - n.document(writer); + node.document(writer); } writer.println(""); }