summaryrefslogtreecommitdiff
path: root/utils/src/main/java/at/gv
diff options
context:
space:
mode:
authorbschnalzer <bianca.schnalzer@egiz.gv.at>2017-03-24 07:31:31 +0100
committerbschnalzer <bianca.schnalzer@egiz.gv.at>2017-03-24 07:31:31 +0100
commite91ebb146d9dd4886b918a0a9a25487674b36f4f (patch)
tree04b22a39c4b6ad166b3ee97ffd38dd318b17dbe4 /utils/src/main/java/at/gv
parentc9d753b4081ce7a4137e29137e958abbc6131f19 (diff)
downloadmocca-e91ebb146d9dd4886b918a0a9a25487674b36f4f.tar.gz
mocca-e91ebb146d9dd4886b918a0a9a25487674b36f4f.tar.bz2
mocca-e91ebb146d9dd4886b918a0a9a25487674b36f4f.zip
Update
Diffstat (limited to 'utils/src/main/java/at/gv')
-rw-r--r--utils/src/main/java/at/gv/egiz/slbinding/RedirectEventFilter.java9
-rw-r--r--utils/src/main/java/at/gv/egiz/slbinding/SLUnmarshaller.java4
2 files changed, 10 insertions, 3 deletions
diff --git a/utils/src/main/java/at/gv/egiz/slbinding/RedirectEventFilter.java b/utils/src/main/java/at/gv/egiz/slbinding/RedirectEventFilter.java
index 4bde19b0..7054c973 100644
--- a/utils/src/main/java/at/gv/egiz/slbinding/RedirectEventFilter.java
+++ b/utils/src/main/java/at/gv/egiz/slbinding/RedirectEventFilter.java
@@ -63,8 +63,10 @@ public class RedirectEventFilter implements EventFilter {
*/
public RedirectEventFilter(OutputStream redirectStream, String encoding)
throws XMLStreamException { // , List<QName> redirectTriggers
- if (redirectStream != null) {
- XMLOutputFactory outputFactory = XMLOutputFactory.newInstance();
+ if (redirectStream != null) {
+ System.setProperty("com.sun.xml.stream.ZephyrWriterFactory", "com.sun.xml.stream.ZephyrWriterFactory");
+ XMLOutputFactory outputFactory = XMLOutputFactory.newFactory("com.sun.xml.stream.ZephyrWriterFactory", null);
+
if (encoding == null) {
encoding = DEFAULT_ENCODING;
}
@@ -205,7 +207,8 @@ public class RedirectEventFilter implements EventFilter {
*/
public void setRedirectStream(OutputStream redirectStream, String encoding, Set<QName> redirectTriggers) throws XMLStreamException {
if (redirectStream != null) {
- XMLOutputFactory outputFactory = XMLOutputFactory.newInstance();
+ System.setProperty("com.sun.xml.stream.ZephyrWriterFactory", "com.sun.xml.stream.ZephyrWriterFactory");
+ XMLOutputFactory outputFactory = XMLOutputFactory.newFactory("com.sun.xml.stream.ZephyrWriterFactory", null);
if (encoding == null) {
encoding = DEFAULT_ENCODING;
}
diff --git a/utils/src/main/java/at/gv/egiz/slbinding/SLUnmarshaller.java b/utils/src/main/java/at/gv/egiz/slbinding/SLUnmarshaller.java
index 70f5dce1..de1b2ddf 100644
--- a/utils/src/main/java/at/gv/egiz/slbinding/SLUnmarshaller.java
+++ b/utils/src/main/java/at/gv/egiz/slbinding/SLUnmarshaller.java
@@ -237,6 +237,10 @@ public class SLUnmarshaller {
public Object unmarshal(StreamSource source) throws XMLStreamException, JAXBException {
ReportingValidationEventHandler validationEventHandler = new ReportingValidationEventHandler();
+// System.setProperty("javax.xml.stream.XMLInputFactory", "com.sun.xml.stream.ZephyrParserFactory");
+// System.setProperty("com.sun.xml.stream.ZephyrParserFactory", "com.sun.xml.stream.ZephyrParserFactory");
+// XMLInputFactory inputFactory = XMLInputFactory.newInstance("com.sun.xml.stream.ZephyrParserFactory", null);
+
XMLInputFactory inputFactory = XMLInputFactory.newInstance();
//disallow DTD and external entities