Skip to content
Snippets Groups Projects
Commit 692ccfc0 authored by Matthias Sohn's avatar Matthias Sohn
Browse files

AmazonS3: Ensure SAXParserFactory sets valid/expected input params

Change Ie8a9d411fc19e8b7bf86c0b4df0b02153a0e9444 broke setting
valid/expected input parameters for the XML parser. This can be fixed
by calling SaxParserFactory#setNamespaceAware, see [1]. Also see earlier
fix in [2].

[1] https://stackoverflow.com/questions/24891323/namespace-handling-with-sax-in-java
[2] I05e993032ab3a6afb78634290b578ebc73cf1cbd

Bug: jgit-87
Change-Id: Id4e9eebac8d9de81e5d48a608066db3cc862e15c
parent d66175d7
No related branches found
No related tags found
No related merge requests found
...@@ -757,8 +757,10 @@ void list() throws IOException { ...@@ -757,8 +757,10 @@ void list() throws IOException {
final XMLReader xr; final XMLReader xr;
try { try {
xr = SAXParserFactory.newInstance().newSAXParser() SAXParserFactory saxParserFactory = SAXParserFactory
.getXMLReader(); .newInstance();
saxParserFactory.setNamespaceAware(true);
xr = saxParserFactory.newSAXParser().getXMLReader();
} catch (SAXException | ParserConfigurationException e) { } catch (SAXException | ParserConfigurationException e) {
throw new IOException( throw new IOException(
JGitText.get().noXMLParserAvailable, e); JGitText.get().noXMLParserAvailable, e);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment