cxf-commits mailing list archives

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

URL: http://svn.apache.org/viewvc?rev=1229967&view=rev
Log:
Merged revisions 1229966 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/branches/2.5.x-fixes

................
  r1229966 | sergeyb | 2012-01-11 11:58:07 +0000 (Wed, 11 Jan 2012) | 9 lines
  
  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.4.x-fixes/   (props changed)
    cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java

Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jan 11 12:00:32 2012
@@ -1,2 +1,2 @@
-/cxf/branches/2.5.x-fixes:1229669
-/cxf/trunk:1229663
+/cxf/branches/2.5.x-fixes:1229669,1229966
+/cxf/trunk:1229663,1229965

Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.4.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.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java?rev=1229967&r1=1229966&r2=1229967&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java
Wed Jan 11 12:00:32 2012
@@ -111,6 +111,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<?>>();
@@ -139,6 +140,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;
@@ -940,7 +946,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