=== modified file 'dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/utils/JacksonUtils.java' --- dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/utils/JacksonUtils.java 2012-06-06 12:18:56 +0000 +++ dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/utils/JacksonUtils.java 2012-06-06 12:25:46 +0000 @@ -58,14 +58,14 @@ private static Map> viewClasses = new HashMap>(); - public static DateFormat DATE_FORMAT = new SimpleDateFormat( "yyyy-MM-dd'T'HH:mm:ssZ" ); - static { ObjectMapper[] objectMappers = new ObjectMapper[] { jsonMapper, xmlMapper }; + DateFormat format = new SimpleDateFormat( "yyyy-MM-dd'T'HH:mm:ssZ" ); for ( ObjectMapper objectMapper : objectMappers ) { + objectMapper.setDateFormat( format ); objectMapper.setSerializationInclusion( JsonInclude.Include.NON_NULL ); objectMapper.configure( SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false ); objectMapper.configure( SerializationFeature.WRITE_EMPTY_JSON_ARRAYS, false ); @@ -75,7 +75,6 @@ objectMapper.disable( MapperFeature.AUTO_DETECT_GETTERS ); objectMapper.disable( MapperFeature.AUTO_DETECT_SETTERS ); objectMapper.disable( MapperFeature.AUTO_DETECT_IS_GETTERS ); - objectMapper.setDateFormat( DATE_FORMAT ); } jsonMapper.getJsonFactory().enable( JsonGenerator.Feature.QUOTE_FIELD_NAMES );