1.1 --- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/DOMForest.java Mon Jun 12 23:06:50 2017 -0700 1.2 +++ b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/DOMForest.java Sun Jun 25 00:13:53 2017 +0100 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -112,15 +112,13 @@ 1.11 this.entityResolver = entityResolver; 1.12 this.errorReceiver = errReceiver; 1.13 this.logic = logic; 1.14 + // secure xml processing can be switched off if input requires it 1.15 + boolean disableXmlSecurity = options == null ? false : options.disableXmlSecurity; 1.16 + 1.17 + DocumentBuilderFactory dbf = XmlUtil.newDocumentBuilderFactory(disableXmlSecurity); 1.18 + this.parserFactory = XmlUtil.newSAXParserFactory(disableXmlSecurity); 1.19 try { 1.20 - // secure xml processing can be switched off if input requires it 1.21 - boolean secureProcessingEnabled = options == null || !options.disableXmlSecurity; 1.22 - DocumentBuilderFactory dbf = XmlUtil.newDocumentBuilderFactory(secureProcessingEnabled); 1.23 - dbf.setNamespaceAware(true); 1.24 this.documentBuilder = dbf.newDocumentBuilder(); 1.25 - 1.26 - this.parserFactory = XmlUtil.newSAXParserFactory(secureProcessingEnabled); 1.27 - this.parserFactory.setNamespaceAware(true); 1.28 } catch (ParserConfigurationException e) { 1.29 throw new AssertionError(e); 1.30 }