Author: dkulp
Date: Mon Jan 28 16:44:37 2013
New Revision: 1439487
URL: http://svn.apache.org/viewvc?rev=1439487&view=rev
Log:
Merged revisions 1439484 via git cherry-pick from
https://svn.apache.org/repos/asf/cxf/trunk
........
r1439484 | dkulp | 2013-01-28 11:41:49 -0500 (Mon, 28 Jan 2013) | 2 lines
[CXF-4750] If the "base" is an enum, but the actual type isn't, it shouldn't
be mapped to an enum
........
Modified:
cxf/branches/2.7.x-fixes/rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/tools/XMLBeansSchemaTypeUtils.java
Modified:
cxf/branches/2.7.x-fixes/rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/tools/XMLBeansSchemaTypeUtils.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/tools/XMLBeansSchemaTypeUtils.java?rev=1439487&r1=1439486&r2=1439487&view=diff
==============================================================================
---
cxf/branches/2.7.x-fixes/rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/tools/XMLBeansSchemaTypeUtils.java
(original)
+++
cxf/branches/2.7.x-fixes/rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/tools/XMLBeansSchemaTypeUtils.java
Mon Jan 28 16:44:37 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()) {