Skip to content

Commit e54e9e0

Browse files
committed
Update release notes wrt #1754, minor tweaks
1 parent 8860630 commit e54e9e0

File tree

5 files changed

+8
-4
lines changed

5 files changed

+8
-4
lines changed

release-notes/CREDITS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -636,6 +636,8 @@ Bertrand Renuart (brenuart@github)
636636
(2.9.1)
637637
* Contributed #1749: StdDateFormat: performance improvement of '_format(..)' method
638638
(2.9.1)
639+
* Contributed #1759: Reuse `Calendar` instance during parsing by `StdDateFormat`
640+
(2.9.1)
639641

640642
Kevin Gallardo (newkek@github)
641643
* Reported #1658: Infinite recursion when deserializing a class extending a Map,

release-notes/VERSION

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Project: jackson-databind
1717
(suggested by Bertrand R)
1818
#1749: StdDateFormat: performance improvement of '_format(..)' method
1919
(contributed by Bertrand R)
20+
#1759: Reuse `Calendar` instance during parsing by `StdDateFormat`
21+
(contributed by Bertrand R)
2022
- Fix `DelegatingDeserializer` constructor to pass `handledType()` (and
2123
not type of deserializer being delegated to!)
2224

src/main/java/com/fasterxml/jackson/databind/util/StdDateFormat.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,7 @@ protected Date _parseAsISO8601(String dateStr, ParsePosition bogus)
599599
tz = _timezone;
600600
}
601601
Calendar cal = _getCalendar(tz);
602+
cal.clear();
602603
String formatStr;
603604
if (totalLen <= 10) {
604605
Matcher m = PATTERN_PLAIN.matcher(dateStr);
@@ -756,8 +757,6 @@ protected Calendar _getCalendar(TimeZone tz) {
756757
cal.setTimeZone(tz);
757758
}
758759
cal.setLenient(isLenient());
759-
cal.clear();
760-
761760
return cal;
762761
}
763762

src/test/java/com/fasterxml/jackson/databind/deser/jdk/MapDeserializationTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,8 @@ public void testIntBooleanMap() throws Exception
223223
{
224224
// to get typing, must use type reference
225225
String JSON = "{ \"1\" : true, \"-1\" : false }";
226-
Map<String,Integer> result = MAPPER.readValue
227-
(JSON, new TypeReference<HashMap<Integer,Boolean>>() { });
226+
Map<Integer,Object> result = MAPPER.readValue
227+
(JSON, new TypeReference<HashMap<Integer,Object>>() { });
228228

229229
assertNotNull(result);
230230
assertEquals(HashMap.class, result.getClass());

src/test/java/com/fasterxml/jackson/databind/deser/jdk/UntypedDeserializationTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ public void testSampleDoc() throws Exception
176176
// and that's all folks!
177177
}
178178

179+
@SuppressWarnings("unlikely-arg-type")
179180
public void testUntypedMap() throws Exception
180181
{
181182
// to get "untyped" default map-to-map, pass Object.class

0 commit comments

Comments
 (0)