Skip to content

Commit

Permalink
Rename argument
Browse files Browse the repository at this point in the history
  • Loading branch information
harawata committed Nov 8, 2023
1 parent d9eb9e5 commit b880ac0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/java/org/apache/ibatis/parsing/XNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,8 @@ public String toString() {
return buildToString(new StringBuilder(), 0).toString();
}

private StringBuilder buildToString(StringBuilder builder, int indent) {
indent(builder, indent).append("<").append(name);
private StringBuilder buildToString(StringBuilder builder, int indentLevel) {
indent(builder, indentLevel).append("<").append(name);
for (Map.Entry<Object, Object> entry : attributes.entrySet()) {
builder.append(" ");
builder.append(entry.getKey());
Expand All @@ -302,15 +302,15 @@ private StringBuilder buildToString(StringBuilder builder, int indent) {
Node node = nodeList.item(i);
short nodeType = node.getNodeType();
if (nodeType == Node.ELEMENT_NODE) {
new XNode(xpathParser, node, variables).buildToString(builder, indent + 1);
new XNode(xpathParser, node, variables).buildToString(builder, indentLevel + 1);
} else {
String text = getBodyData(node).trim();
if (text.length() > 0) {
indent(builder, indent + 1).append(text).append("\n");
indent(builder, indentLevel + 1).append(text).append("\n");
}
}
}
indent(builder, indent).append("</").append(name).append(">\n");
indent(builder, indentLevel).append("</").append(name).append(">\n");
}

return builder;
Expand Down

0 comments on commit b880ac0

Please sign in to comment.