From 6794a686819554742ec906bbbc749a9241f7e452 Mon Sep 17 00:00:00 2001 From: Alex Menkov Date: Mon, 9 Sep 2019 12:00:36 -0700 Subject: [PATCH] 8230516: invalid html in jdwp-protocol.html Reviewed-by: dtitov, sspitsyn --- .../jdk/src/classes/build/tools/jdwpgen/ConstantNode.java | 8 +++++++- .../src/classes/build/tools/jdwpgen/ConstantSetNode.java | 4 +--- 2 files changed, 8 insertions(+), 4 deletions(-) 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(""); }