protected DateFormat getDateFormat() { if (_dateFormat != null) { return _dateFormat; } /* 24-Feb-2012, tatu: At this point, all timezone configuration * should have occurred, with respect to default dateformat * and timezone configuration. But we still better clone * an instance as formatters may be stateful. */ DateFormat df = _config.getDateFormat(); _dateFormat = df = (DateFormat) df.clone(); return df; } }
DateFormat df = ctxt.getConfig().getDateFormat(); DateFormat df = ctxt.getConfig().getDateFormat(); String pattern = _formatString;
@Test public void simpleDateFormatStringSetter() { SimpleDateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT); ObjectMapper objectMapper = Jackson2ObjectMapperBuilder.json().simpleDateFormat(DATE_FORMAT).build(); assertEquals(dateFormat, objectMapper.getSerializationConfig().getDateFormat()); assertEquals(dateFormat, objectMapper.getDeserializationConfig().getDateFormat()); }
@Test public void dateTimeFormatSetter() { SimpleDateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT); ObjectMapper objectMapper = Jackson2ObjectMapperBuilder.json().dateFormat(dateFormat).build(); assertEquals(dateFormat, objectMapper.getSerializationConfig().getDateFormat()); assertEquals(dateFormat, objectMapper.getDeserializationConfig().getDateFormat()); }
@Test public void setDateFormat() { this.factory.setDateFormat(this.dateFormat); this.factory.afterPropertiesSet(); assertEquals(this.dateFormat, this.factory.getObject().getSerializationConfig().getDateFormat()); assertEquals(this.dateFormat, this.factory.getObject().getDeserializationConfig().getDateFormat()); }
@Test public void setSimpleDateFormat() { this.factory.setSimpleDateFormat(DATE_FORMAT); this.factory.afterPropertiesSet(); assertEquals(this.dateFormat, this.factory.getObject().getSerializationConfig().getDateFormat()); assertEquals(this.dateFormat, this.factory.getObject().getDeserializationConfig().getDateFormat()); }
protected DateFormat getDateFormat() { if (_dateFormat != null) { return _dateFormat; } /* 24-Feb-2012, tatu: At this point, all timezone configuration * should have occured, with respect to default dateformat * and timezone configuration. But we still better clone * an instance as formatters may be stateful. */ DateFormat df = _config.getDateFormat(); _dateFormat = df = (DateFormat) df.clone(); return df; }
protected DateFormat getDateFormat() { if (_dateFormat != null) { return _dateFormat; } /* 24-Feb-2012, tatu: At this point, all timezone configuration * should have occurred, with respect to default dateformat * and timezone configuration. But we still better clone * an instance as formatters may be stateful. */ DateFormat df = _config.getDateFormat(); _dateFormat = df = (DateFormat) df.clone(); return df; }
protected DateFormat getDateFormat() { if (_dateFormat != null) { return _dateFormat; } /* 24-Feb-2012, tatu: At this point, all timezone configuration * should have occurred, with respect to default dateformat * and timezone configuration. But we still better clone * an instance as formatters may be stateful. */ DateFormat df = _config.getDateFormat(); _dateFormat = df = (DateFormat) df.clone(); return df; }
protected DateFormat getDateFormat() { if (_dateFormat != null) { return _dateFormat; } /* 24-Feb-2012, tatu: At this point, all timezone configuration * should have occurred, with respect to default dateformat * and timezone configuration. But we still better clone * an instance as formatters may be stateful. */ DateFormat df = _config.getDateFormat(); _dateFormat = df = (DateFormat) df.clone(); return df; } }
protected DateFormat getDateFormat() { if (_dateFormat != null) { return _dateFormat; } /* 24-Feb-2012, tatu: At this point, all timezone configuration * should have occurred, with respect to default dateformat * and timezone configuration. But we still better clone * an instance as formatters may be stateful. */ DateFormat df = _config.getDateFormat(); _dateFormat = df = (DateFormat) df.clone(); return df; }
protected DateFormat getDateFormat() { if (_dateFormat != null) { return _dateFormat; } /* 24-Feb-2012, tatu: At this point, all timezone configuration * should have occured, with respect to default dateformat * and timezone configuration. But we still better clone * an instance as formatters may be stateful. */ DateFormat df = _config.getDateFormat(); _dateFormat = df = (DateFormat) df.clone(); return df; }
DateFormat df = ctxt.getConfig().getDateFormat();
DateFormat df = ctxt.getConfig().getDateFormat();
DateFormat df = ctxt.getConfig().getDateFormat(); DateFormat df = ctxt.getConfig().getDateFormat(); String pattern = _formatString;
Date readValue = objectMapper.getDeserializationConfig().getDateFormat().parse(lastUpdatedString); lastUpdated = readValue.getTime(); } catch (ParseException e) {
Date readValue = objectMapper.getDeserializationConfig().getDateFormat().parse(lastUpdatedString); lastUpdated = readValue.getTime(); } catch (ParseException e) {
DateFormat df = ctxt.getConfig().getDateFormat();
DateFormat df = ctxt.getConfig().getDateFormat();
DateFormat df = ctxt.getConfig().getDateFormat();