Skip to content

Commit beed2c2

Browse files
exclude nested elements in XMLtools.getElementNode
This ensures that the description of a child suite is not used for a parent suite when the parent suite does not have a description. This was the root cause of issue #126.
1 parent ffb8ba5 commit beed2c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sqldev/src/main/java/org/utplsql/sqldev/model/XMLTools.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,13 @@ public Node getElementNode(final Node node, final String tagName) {
130130
Node resultNode = null;
131131
if (node instanceof Element) {
132132
NodeList list = ((Element) node).getElementsByTagName(tagName);
133-
if (list != null && list.getLength() > 0) {
133+
if (list != null && list.getLength() > 0 && list.item(0).getParentNode() == node) {
134134
resultNode = list.item(0);
135135
}
136136
}
137137
return resultNode;
138138
}
139-
139+
140140
public DocumentBuilder createDocumentBuilder() {
141141
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
142142
try {

0 commit comments

Comments
 (0)