[JAXRS-CXF] [bug #4422] use java.util.Date when selecting dateLibrary=legacy (#4724)

according to the help message setting dateLibrary to 'legacy' should
make the code generator use java.util.Date.
before this change, when setting dateLibrary to 'legacy' made the
generator use javax.xml.datatype.XMLGregorianCalendar.
now, the generator uses java.util.Date such that the documentation and
behavior are consistent.
This commit is contained in:
Matan Rubin 2017-03-06 08:25:15 +02:00 committed by wing328
parent 6c9b0ce257
commit 899ef8f1ef
3 changed files with 38 additions and 41 deletions

View File

@ -63,7 +63,6 @@ public class JavaCXFClientCodegen extends AbstractJavaCodegen
typeMapping.put("date", "LocalDate"); typeMapping.put("date", "LocalDate");
typeMapping.put("DateTime", "javax.xml.datatype.XMLGregorianCalendar"); // Map DateTime fields to Java standart class 'XMLGregorianCalendar'
importMapping.put("LocalDate", "org.joda.time.LocalDate"); importMapping.put("LocalDate", "org.joda.time.LocalDate");

View File

@ -78,7 +78,6 @@ public class JavaCXFServerCodegen extends AbstractJavaJAXRSServerCodegen
typeMapping.put("date", "LocalDate"); typeMapping.put("date", "LocalDate");
typeMapping.put("DateTime", "javax.xml.datatype.XMLGregorianCalendar"); // Map DateTime fields to Java standart class 'XMLGregorianCalendar'
importMapping.put("LocalDate", "org.joda.time.LocalDate"); importMapping.put("LocalDate", "org.joda.time.LocalDate");

View File

@ -48,7 +48,6 @@ public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen
additionalProperties.put("title", title); additionalProperties.put("title", title);
typeMapping.put("date", "LocalDate"); typeMapping.put("date", "LocalDate");
typeMapping.put("DateTime", "javax.xml.datatype.XMLGregorianCalendar"); // Map DateTime fields to Java standart class 'XMLGregorianCalendar'
importMapping.put("LocalDate", "org.joda.time.LocalDate"); importMapping.put("LocalDate", "org.joda.time.LocalDate");