提交 ef5da49b 编写于 作者: S Soul Trace 提交者: skylot

fix(xml): reset nsMap in parse method (PR #798 #796)

Fixes injection of xmlns: attributes from other files (#796)
上级 7545625a
......@@ -41,7 +41,7 @@ public class BinaryXMLParser extends CommonBinaryParser {
private final Map<Integer, String> styleMap = new HashMap<>();
private final Map<Integer, String> resNames;
private final Map<String, String> nsMap = new HashMap<>();
private Map<String, String> nsMap;
private Set<String> nsMapGenerated;
private final Map<String, String> tagAttrDeobfNames = new HashMap<>();
......@@ -86,11 +86,13 @@ public class BinaryXMLParser extends CommonBinaryParser {
return ResourcesLoader.loadToCodeWriter(inputStream);
}
nsMapGenerated = new HashSet<>();
nsMap = new HashMap<>();
writer = new CodeWriter();
writer.add("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
firstElement = true;
decode();
writer.finish();
nsMap = null;
return writer;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册