8230516: invalid html in jdwp-protocol.html

Reviewed-by: dtitov, sspitsyn
This commit is contained in:
Alex Menkov 2019-09-09 12:00:36 -07:00
parent a4613d4a8f
commit 6794a68681
2 changed files with 8 additions and 4 deletions

View File

@ -55,8 +55,14 @@ class ConstantNode extends AbstractCommandNode {
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() + "&nbsp;"
+ "</tr>");

View File

@ -62,9 +62,7 @@ class ConstantSetNode extends AbstractNamedNode {
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>");
}