提交 2e5d73a7 编写于 作者: S Sergey Toshin 提交者: Skylot

Fixes bug with NS declaration duplicates

上级 1c352cc8
......@@ -174,7 +174,11 @@ public class BinaryXMLParser extends CommonBinaryParser {
int comment = is.readInt32();
int beginPrefix = is.readInt32();
int beginURI = is.readInt32();
nsMap.computeIfAbsent(getString(beginURI), k -> getString(beginPrefix));
String nsValue = getString(beginPrefix);
if(!nsMap.containsValue(nsValue)) {
nsMap.putIfAbsent(getString(beginURI), nsValue);
}
namespaceDepth++;
}
......@@ -190,7 +194,11 @@ public class BinaryXMLParser extends CommonBinaryParser {
int endPrefix = is.readInt32();
int endURI = is.readInt32();
namespaceDepth--;
nsMap.computeIfAbsent(getString(endURI), k -> getString(endPrefix));
String nsValue = getString(endPrefix);
if(!nsMap.containsValue(nsValue)) {
nsMap.putIfAbsent(getString(endURI), nsValue);
}
}
private void parseCData() throws IOException {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册