diff --git a/src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java b/src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java index b654e1bebe..5dd2820871 100644 --- a/src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java +++ b/src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java @@ -762,10 +762,7 @@ protected final Integer _parseInteger(JsonParser p, DeserializationContext ctxt, return _parseInteger(ctxt, text); } - /** - * @since 2.14 - */ - protected final Integer _parseInteger(DeserializationContext ctxt, String text) throws IOException + protected final Integer _parseInteger(DeserializationContext ctxt, String text) { try { if (text.length() > 9) { @@ -902,10 +899,7 @@ protected final Long _parseLong(JsonParser p, DeserializationContext ctxt, return _parseLong(ctxt, text); } - /** - * @since 2.14 - */ - protected final Long _parseLong(DeserializationContext ctxt, String text) throws IOException + protected final Long _parseLong(DeserializationContext ctxt, String text) { try { return NumberInput.parseLong(text); diff --git a/src/test/java/com/fasterxml/jackson/databind/deser/filter/ProblemHandler3450Test.java b/src/test/java/com/fasterxml/jackson/databind/deser/filter/ProblemHandler3450Test.java index ce52045ff9..d02de55cf7 100644 --- a/src/test/java/com/fasterxml/jackson/databind/deser/filter/ProblemHandler3450Test.java +++ b/src/test/java/com/fasterxml/jackson/databind/deser/filter/ProblemHandler3450Test.java @@ -1,7 +1,5 @@ package com.fasterxml.jackson.databind.deser.filter; -import java.io.IOException; - import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.deser.DeserializationProblemHandler; import com.fasterxml.jackson.databind.json.JsonMapper; @@ -9,13 +7,11 @@ public class ProblemHandler3450Test extends BaseMapTest { // [databind#3450] - static class LenientDeserializationProblemHandler extends DeserializationProblemHandler { - @Override public Object handleWeirdStringValue(DeserializationContext ctxt, Class targetType, String valueToConvert, - String failureMsg) throws IOException { - + String failureMsg) + { // I just want to ignore badly formatted value return null; } @@ -32,6 +28,7 @@ static class TestPojo3450Long { private final ObjectMapper LENIENT_MAPPER = JsonMapper.builder().addHandler(new LenientDeserializationProblemHandler()).build(); + // [databind#3450] public void testIntegerCoercion3450() throws Exception { TestPojo3450Int pojo;