ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1165735 - /webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/builders/converters/ConverterRegistry.java
Date Tue, 06 Sep 2011 16:01:10 GMT
Author: veithen
Date: Tue Sep  6 16:01:09 2011
New Revision: 1165735

URL: http://svn.apache.org/viewvc?rev=1165735&view=rev
Log:
Avoid unnecessary conversions if the object model implements both DOM and Axiom.

Modified:
    webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/builders/converters/ConverterRegistry.java

Modified: webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/builders/converters/ConverterRegistry.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/builders/converters/ConverterRegistry.java?rev=1165735&r1=1165734&r2=1165735&view=diff
==============================================================================
--- webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/builders/converters/ConverterRegistry.java
(original)
+++ webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/builders/converters/ConverterRegistry.java
Tue Sep  6 16:01:09 2011
@@ -45,16 +45,19 @@ public class ConverterRegistry {
     private List<ConverterKey> registeredConverters = new CopyOnWriteArrayList<ConverterKey>();
     
     public ConverterRegistry() {
-        //built into JDK stuff, should have no problem
+        // Register the identity converters first to avoid unnecessary conversions
+        // if the supplied element implements both the DOM and Axiom APIs.
         registerConverter(new DOMToDOMConverter());
         registerConverter(new StaxToStaxConverter());
+        registerConverter("org.apache.neethi.builders.converters.OMToOMConverter");
+        
+        //built into JDK stuff, should have no problem
         registerConverter(new StaxToDOMConverter());
         registerConverter(new DOMToStaxConverter());
 
         //requires Axiom, may have an issue
         registerConverter("org.apache.neethi.builders.converters.DOMToOMConverter");
         registerConverter("org.apache.neethi.builders.converters.OMToDOMConverter");
-        registerConverter("org.apache.neethi.builders.converters.OMToOMConverter");
         registerConverter("org.apache.neethi.builders.converters.StaxToOMConverter");
         registerConverter("org.apache.neethi.builders.converters.OMToStaxConverter");
     }



Mime
View raw message