Skip to content

Commit d1c4048

Browse files
kupcicowtowncoder
authored andcommitted
restore fix for parsing of ZoneId that conflicted with changes for issue 138 (#145)
1 parent 47825fe commit d1c4048

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

datetime/src/main/java/com/fasterxml/jackson/datatype/jsr310/deser/JSR310StringParsableDeserializer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public Object deserialize(JsonParser parser, DeserializationContext context) thr
9898
if (!isLenient()) {
9999
return _failForNotLenient(parser, context, JsonToken.VALUE_STRING);
100100
}
101-
return null;
101+
return _coerceEmptyString(context, false);
102102
}
103103
try {
104104
switch (_typeSelector) {

datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/deser/ZoneIdDeserTest.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,7 @@ public void testStrictDeserializeFromEmptyString() throws Exception {
114114
objectReader.readValue(valueFromEmptyStr);
115115
}
116116

117-
// [module-java8#68]: Was to prevent it but... conflicts with [#138]
118-
@Ignore
117+
// [module-java8#68]
119118
@Test
120119
public void testZoneOffsetDeserFromEmpty() throws Exception
121120
{

datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/deser/ZoneOffsetDeserTest.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,7 @@ public void testStrictDeserializeFromEmptyString() throws Exception {
182182
objectReader.readValue(valueFromEmptyStr);
183183
}
184184

185-
// [module-java8#68]: Was to prevent it but... conflicts with [#138]
186-
@Ignore
185+
// [module-java8#68]
187186
@Test
188187
public void testZoneOffsetDeserFromEmpty() throws Exception
189188
{

release-notes/VERSION

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ due to number of types.
1515

1616
3.0.0 (not yet released)
1717

18+
- #68: Parsing of `ZoneId` should respect `ALLOW_COERCION_OF_SCALARS`
19+
wrt empty String
1820
- Deprecate "paramater names" and "datatypes" modules as functionality
1921
now included directly in `jackson-databind`
2022
- Remove legacy `JSR310Module`

0 commit comments

Comments
 (0)