[java-opensaml COMMIT] /trunk/opensaml-core/src/main/java/org/opensaml/xml/util/XMLObjectSupport.java

noreply at shibboleth.net noreply at shibboleth.net
Tue Jan 31 01:42:19 GMT 2012


Author: putmanb
Date: Tue Jan 31 01:42:19 2012
New Revision: 2950

URL: http://svn.shibboleth.net/view/java-opensaml?rev=2950&view=rev
Log:
Clean up support class.

Modified:
    trunk/opensaml-core/src/main/java/org/opensaml/xml/util/XMLObjectSupport.java

Modified: trunk/opensaml-core/src/main/java/org/opensaml/xml/util/XMLObjectSupport.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-core/src/main/java/org/opensaml/xml/util/XMLObjectSupport.java?rev=2950&r1=2949&r2=2950&view=diff
==============================================================================
--- trunk/opensaml-core/src/main/java/org/opensaml/xml/util/XMLObjectSupport.java (original)
+++ trunk/opensaml-core/src/main/java/org/opensaml/xml/util/XMLObjectSupport.java Tue Jan 31 01:42:19 2012
@@ -114,7 +114,7 @@
             return null;
         }
         
-        Marshaller marshaller = XMLObjectProviderRegistrySupport.getMarshallerFactory().getMarshaller(originalXMLObject);
+        Marshaller marshaller = getMarshaller(originalXMLObject);
         Element origElement = marshaller.marshall(originalXMLObject);
         
         Element clonedElement = null;
@@ -132,7 +132,7 @@
             clonedElement = (Element) origElement.cloneNode(true);
         }
         
-        Unmarshaller unmarshaller = XMLObjectProviderRegistrySupport.getUnmarshallerFactory().getUnmarshaller(clonedElement);
+        Unmarshaller unmarshaller = getUnmarshaller(clonedElement);
         T clonedXMLObject = (T) unmarshaller.unmarshall(clonedElement);
         
         return clonedXMLObject;
@@ -161,7 +161,7 @@
         }
 
         log.debug("Unmarshalling DOM parsed from InputStream");
-        Unmarshaller unmarshaller = XMLObjectProviderRegistrySupport.getUnmarshallerFactory().getUnmarshaller(messageElem);
+        Unmarshaller unmarshaller = getUnmarshaller(messageElem);
         if (unmarshaller == null) {
             log.error("Unable to unmarshall InputStream, no unmarshaller registered for element "
                     + QNameSupport.getNodeQName(messageElem));
@@ -200,7 +200,7 @@
         }
 
         log.debug("Unmarshalling DOM parsed from Reader");
-        Unmarshaller unmarshaller = XMLObjectProviderRegistrySupport.getUnmarshallerFactory().getUnmarshaller(messageElem);
+        Unmarshaller unmarshaller = getUnmarshaller(messageElem);
         if (unmarshaller == null) {
             log.error("Unable to unmarshall Reader, no unmarshaller registered for element "
                     + QNameSupport.getNodeQName(messageElem));
@@ -232,7 +232,7 @@
             return xmlObject.getDOM();
         }
 
-        Marshaller marshaller = XMLObjectProviderRegistrySupport.getMarshallerFactory().getMarshaller(xmlObject);
+        Marshaller marshaller = getMarshaller(xmlObject);
         if (marshaller == null) {
             log.error("Unable to marshall XMLOBject, no marshaller registered for object: "
                     + xmlObject.getElementQName());
@@ -464,7 +464,7 @@
      * @param element the DOM element
      * @return an XMLObject unmarshaller, or null if no provider registered
      */
-    public static Unmarshaller getunmarshaller(Element element) {
+    public static Unmarshaller getUnmarshaller(Element element) {
         return getProviderRegistry().getUnmarshallerFactory().getUnmarshaller(element);
     }
     



More information about the commits mailing list