cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1229966 - in /cxf/branches/2.5.x-fixes: ./ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java
Date Wed, 11 Jan 2012 11:58:07 GMT
Author: sergeyb
Date: Wed Jan 11 11:58:07 2012
New Revision: 1229966

URL: http://svn.apache.org/viewvc?rev=1229966&view=rev
Log:
Merged revisions 1229965 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1229965 | sergeyb | 2012-01-11 11:56:19 +0000 (Wed, 11 Jan 2012) | 1 line
  
  [CXF-4015] Mapping xsd:integer to long
........

Modified:
    cxf/branches/2.5.x-fixes/   (props changed)
    cxf/branches/2.5.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java

Propchange: cxf/branches/2.5.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jan 11 11:58:07 2012
@@ -1,3 +1,3 @@
 /cxf/branches/wss4j-1.6-port:1043100-1069432
 /cxf/sandbox/wss4j-1.6-port:1031652-1043098
-/cxf/trunk:1229663
+/cxf/trunk:1229663,1229965

Propchange: cxf/branches/2.5.x-fixes/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Jan 11 11:58:07 2012
@@ -1 +1 @@
-/cxf/trunk:1-1227739,1229663
+/cxf/trunk:1-1227739,1229663,1229965

Modified: cxf/branches/2.5.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java?rev=1229966&r1=1229965&r2=1229966&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java
(original)
+++ cxf/branches/2.5.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java
Wed Jan 11 11:58:07 2012
@@ -112,6 +112,7 @@ public class SourceGenerator {
     private static final Map<String, Class<?>> PARAM_ANNOTATIONS;
     private static final Set<String> RESOURCE_LEVEL_PARAMS;
     private static final Map<String, String> AUTOBOXED_PRIMITIVES_MAP;
+    private static final Map<String, String> XSD_SPECIFIC_TYPE_MAP;
     
     static {
         HTTP_METHOD_ANNOTATIONS = new HashMap<String, Class<?>>();
@@ -140,6 +141,11 @@ public class SourceGenerator {
         AUTOBOXED_PRIMITIVES_MAP.put(float.class.getSimpleName(), Float.class.getSimpleName());
         AUTOBOXED_PRIMITIVES_MAP.put(double.class.getSimpleName(), Double.class.getSimpleName());
         AUTOBOXED_PRIMITIVES_MAP.put(boolean.class.getSimpleName(), Boolean.class.getSimpleName());
+        
+        XSD_SPECIFIC_TYPE_MAP = new HashMap<String, String>();
+        XSD_SPECIFIC_TYPE_MAP.put("string", "String");
+        XSD_SPECIFIC_TYPE_MAP.put("decimal", "java.math.BigInteger");
+        XSD_SPECIFIC_TYPE_MAP.put("integer", "long");
     }
 
     private Comparator<String> importsComparator;
@@ -941,7 +947,11 @@ public class SourceGenerator {
         }
         String[] pair = type.split(":");
         String value = pair.length == 2 ? pair[1] : type;
-        return "string".equals(value) ? "String" : value;
+        if (XSD_SPECIFIC_TYPE_MAP.containsKey(value)) {
+            return XSD_SPECIFIC_TYPE_MAP.get(value);
+        } else {
+            return value;
+        }
     }
     
     private String getElementRefName(Element repElement,



Mime
View raw message