cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r967247 - /cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java
Date Fri, 23 Jul 2010 20:33:38 GMT
Author: dkulp
Date: Fri Jul 23 20:33:37 2010
New Revision: 967247

URL: http://svn.apache.org/viewvc?rev=967247&view=rev
Log:
[CXF-2907] Remove check for JAXB < 2.1 as we just assume 2.1 or newer
Patch from Gary Gregory applied with thanks!

Modified:
    cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java

Modified: cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java?rev=967247&r1=967246&r2=967247&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java
(original)
+++ cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java
Fri Jul 23 20:33:37 2010
@@ -34,7 +34,6 @@ import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-import java.util.StringTokenizer;
 import java.util.jar.Attributes;
 import java.util.jar.JarFile;
 import java.util.logging.Level;
@@ -422,7 +421,7 @@ public class DynamicClientFactory {
             num++;
         }
         
-        if (simpleBindingEnabled && isJaxb21(compiler)) {
+        if (simpleBindingEnabled) {
             String id = "/org/apache/cxf/endpoint/dynamic/simple-binding.xjb";
             LOG.info("Loading the JAXB 2.1 simple binding for client.");
             InputSource source = new InputSource(getClass().getResourceAsStream(id));
@@ -431,32 +430,6 @@ public class DynamicClientFactory {
         }
     }
     
-    private boolean isJaxb21(SchemaCompiler sc) {
-        String id = sc.getOptions().getBuildID();
-        StringTokenizer st = new StringTokenizer(id, ".");
-        String minor = null;
-        
-        // major version
-        if (st.hasMoreTokens()) {
-            st.nextToken();
-        }
-        
-        if (st.hasMoreTokens()) {
-            minor = st.nextToken();
-        }
-        
-        try {
-            int i = Integer.valueOf(minor);
-            if (i >= 1) {
-                return true;
-            }
-        } catch (NumberFormatException e) {
-            // do nothing;
-        }
-        
-        return false;
-    }
-
     public boolean isSimpleBindingEnabled() {
         return simpleBindingEnabled;
     }



Mime
View raw message