jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/DomAnnotationParserFactory.java
changeset 19645 36f707905f2b
parent 12009 4abb694f273a
child 22679 d785acd84a14
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/DomAnnotationParserFactory.java	Wed Jul 05 19:07:31 2017 +0200
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/DomAnnotationParserFactory.java	Fri Aug 23 09:57:21 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,7 @@
 import com.sun.xml.internal.xsom.parser.AnnotationContext;
 import com.sun.xml.internal.xsom.parser.AnnotationParser;
 import com.sun.xml.internal.xsom.parser.AnnotationParserFactory;
+import javax.xml.XMLConstants;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
@@ -56,10 +57,15 @@
  * @author Kohsuke Kawaguchi
  */
 public class DomAnnotationParserFactory implements AnnotationParserFactory {
+
     public AnnotationParser create() {
         return new AnnotationParserImpl();
     }
 
+    public AnnotationParser create(boolean disableSecureProcessing) {
+        return new AnnotationParserImpl();
+    }
+
     private static final SAXTransformerFactory stf = (SAXTransformerFactory) SAXTransformerFactory.newInstance();
 
     private static class AnnotationParserImpl extends AnnotationParser {
@@ -71,8 +77,13 @@
         private DOMResult result;
 
         AnnotationParserImpl() {
+            this(false);
+        }
+
+        AnnotationParserImpl(boolean disableSecureProcessing) {
             try {
                 transformer = stf.newTransformerHandler();
+                stf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, disableSecureProcessing);
             } catch (TransformerConfigurationException e) {
                 throw new Error(e); // impossible
             }