[java-opensaml COMMIT] /trunk/opensaml-core/src/main/java/org/opensaml/core/xml/io/AbstractXMLObjectMarshaller.java

noreply at shibboleth.net noreply at shibboleth.net
Tue Jan 29 23:10:36 EST 2013


Author: scantor
Date: Tue Jan 29 23:10:36 2013
New Revision: 3173

URL: http://svn.shibboleth.net/view/java-opensaml?rev=3173&view=rev
Log:
Port java-xmltooling r727

Modified:
    trunk/opensaml-core/src/main/java/org/opensaml/core/xml/io/AbstractXMLObjectMarshaller.java

Modified: trunk/opensaml-core/src/main/java/org/opensaml/core/xml/io/AbstractXMLObjectMarshaller.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-core/src/main/java/org/opensaml/core/xml/io/AbstractXMLObjectMarshaller.java?rev=3173&r1=3172&r2=3173&view=diff
==============================================================================
--- trunk/opensaml-core/src/main/java/org/opensaml/core/xml/io/AbstractXMLObjectMarshaller.java (original)
+++ trunk/opensaml-core/src/main/java/org/opensaml/core/xml/io/AbstractXMLObjectMarshaller.java Tue Jan 29 23:10:36 2013
@@ -22,13 +22,12 @@
 
 import javax.annotation.Nonnull;
 import javax.xml.namespace.QName;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
 
 import net.shibboleth.utilities.java.support.primitive.StringSupport;
 import net.shibboleth.utilities.java.support.xml.ElementSupport;
 import net.shibboleth.utilities.java.support.xml.NamespaceSupport;
 import net.shibboleth.utilities.java.support.xml.QNameSupport;
+import net.shibboleth.utilities.java.support.xml.XMLParserException;
 import net.shibboleth.utilities.java.support.xml.XmlConstants;
 
 import org.opensaml.core.xml.AttributeExtensibleXMLObject;
@@ -72,9 +71,9 @@
     /** {@inheritDoc} */
     @Nonnull public Element marshall(@Nonnull final XMLObject xmlObject) throws MarshallingException {
         try {
-            Document document = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
+            Document document = XMLObjectProviderRegistrySupport.getParserPool().newDocument();
             return marshall(xmlObject, document);
-        } catch (ParserConfigurationException e) {
+        } catch (XMLParserException e) {
             throw new MarshallingException("Unable to create Document to place marshalled elements in", e);
         }
     }



More information about the commits mailing list