From cf6b0a01969e472666ab3a20ac62c7e7b2a9b820 Mon Sep 17 00:00:00 2001 From: Dylan Pulver Date: Wed, 21 Oct 2026 18:42:24 -0400 Subject: [PATCH] Add missing `@Test` annotation to `OptionalTest.testIssue372Deser()` The regression test for #372 was written on `2.18`, where this class still extended a JUnit 3 `TestCase` base and methods were collected by name. `2.19` had already migrated to JUnit 5 in #344, so the merge from `2.18` carried the method over without an annotation and nothing has run it since. `ModuleTestBase` does not extend `TestCase` and nothing in the file calls the method, so it has been dead since 2.18.5 shipped the fix in October 2025. `mvn test -Dtest=OptionalTest` in `datatypes` goes from 13 tests to 14. The method passes as written, so this adds coverage without changing behaviour. --- .../java/com/fasterxml/jackson/datatype/jdk8/OptionalTest.java | 1 + 1 file changed, 1 insertion(+) diff --git a/datatypes/src/test/java/com/fasterxml/jackson/datatype/jdk8/OptionalTest.java b/datatypes/src/test/java/com/fasterxml/jackson/datatype/jdk8/OptionalTest.java index d4bc805c..204fdfbb 100644 --- a/datatypes/src/test/java/com/fasterxml/jackson/datatype/jdk8/OptionalTest.java +++ b/datatypes/src/test/java/com/fasterxml/jackson/datatype/jdk8/OptionalTest.java @@ -284,6 +284,7 @@ public void testTypeResolution() throws Exception } // [modules-java8#372] + @Test public void testIssue372Deser() throws Exception { JsonNode input = MAPPER.getNodeFactory().textNode("abc");