Skip to content

Commit fb24140

Browse files
committed
Merge branch '2.14'
2 parents bf79692 + 0fe97e0 commit fb24140

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

pom.xml

+4-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@
5050
<packageVersion.dir>tools/jackson/databind/cfg</packageVersion.dir>
5151
<packageVersion.package>tools.jackson.databind.cfg</packageVersion.package>
5252

53-
<version.powermock>2.0.0</version.powermock>
53+
<version.powermock>2.0.9</version.powermock>
54+
55+
<!-- for Reproducible Builds -->
56+
<project.build.outputTimestamp>2022-09-18T00:00:00Z</project.build.outputTimestamp>
5457
</properties>
5558

5659
<dependencies>

src/test/java/tools/jackson/databind/deser/jdk/JDKStringLikeTypeDeserTest.java

+9
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,15 @@ public void testPattern() throws IOException
185185
json = MAPPER.writeValueAsString(exp);
186186
result = MAPPER.readValue(json, Pattern.class);
187187
assertEquals(exp.pattern(), result.pattern());
188+
189+
// [databind#3598]: should also handle invalid pattern serialization
190+
// somehwat gracefully
191+
try {
192+
MAPPER.readValue(q("[abc"), Pattern.class);
193+
fail("Should not pass");
194+
} catch (InvalidFormatException e) {
195+
verifyException(e, "not a valid textual representation, problem: Unclosed character class");
196+
}
188197
}
189198

190199
public void testStackTraceElement() throws Exception

0 commit comments

Comments
 (0)