Author: dkulp
Date: Mon Jan 28 16:41:49 2013
New Revision: 1439484

URL: http://svn.apache.org/viewvc?rev=1439484&view=rev
Log:
[CXF-4750] If the "base" is an enum, but the actual type isn't, it shouldn't be 
mapped to an enum

Modified:
    
cxf/trunk/rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/tools/XMLBeansSchemaTypeUtils.java

Modified: 
cxf/trunk/rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/tools/XMLBeansSchemaTypeUtils.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/tools/XMLBeansSchemaTypeUtils.java?rev=1439484&r1=1439483&r2=1439484&view=diff
==============================================================================
--- 
cxf/trunk/rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/tools/XMLBeansSchemaTypeUtils.java
 (original)
+++ 
cxf/trunk/rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/tools/XMLBeansSchemaTypeUtils.java
 Mon Jan 28 16:41:49 2013
@@ -90,13 +90,8 @@ public final class XMLBeansSchemaTypeUti
     public static String getNaturalJavaClassName(SchemaType st) {
         SchemaType schemaType = st;
         String result = null;
-        if (st.getBaseEnumType() != null) {
-            if (hasBase(st)) {
-                schemaType = st.getBaseEnumType();
-                return schemaType.getFullJavaName().replace('$', '.') + 
".Enum";
-            } else {
-                return st.getFullJavaName().replace('$', '.') + ".Enum";
-            }
+        if (st.getBaseEnumType() != null && !hasBase(st)) {
+            return st.getFullJavaName().replace('$', '.') + ".Enum";
         } else if (st.isSimpleType() && !st.isBuiltinType()) {
             schemaType = st.getBaseType();
             while (schemaType != null && !schemaType.isBuiltinType()) {


Reply via email to