diff options
author | Tatu Saloranta <tatu.saloranta@iki.fi> | 2019-09-15 16:17:48 -0700 |
---|---|---|
committer | Tatu Saloranta <tatu.saloranta@iki.fi> | 2019-09-15 16:17:48 -0700 |
commit | 2599caf11064b38960e75f534ce8bdf6d43b90c5 (patch) | |
tree | 9af62d921e9a06add285ea7be25bee611f5f797d /src/main/java/com/fasterxml/jackson/databind/deser/DeserializationProblemHandler.java | |
parent | 28e775fcac16452cc011903cd9cca7661c5e9a6f (diff) | |
download | jackson-databind-2599caf11064b38960e75f534ce8bdf6d43b90c5.tar.gz |
Update release notes wrt #2133, minor code cleanup
Diffstat (limited to 'src/main/java/com/fasterxml/jackson/databind/deser/DeserializationProblemHandler.java')
-rw-r--r-- | src/main/java/com/fasterxml/jackson/databind/deser/DeserializationProblemHandler.java | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/src/main/java/com/fasterxml/jackson/databind/deser/DeserializationProblemHandler.java b/src/main/java/com/fasterxml/jackson/databind/deser/DeserializationProblemHandler.java index 2524f18b9..2d6b88c21 100644 --- a/src/main/java/com/fasterxml/jackson/databind/deser/DeserializationProblemHandler.java +++ b/src/main/java/com/fasterxml/jackson/databind/deser/DeserializationProblemHandler.java @@ -202,32 +202,14 @@ public abstract class DeserializationProblemHandler } /** - * Method that deserializers should call if the first token of the value to - * deserialize is of unexpected type (that is, type of token that deserializer - * cannot handle). This could occur, for example, if a Number deserializer - * encounter {@link JsonToken#START_ARRAY} instead of - * {@link JsonToken#VALUE_NUMBER_INT} or {@link JsonToken#VALUE_NUMBER_FLOAT}. - *<ul> - * <li>Indicate it does not know what to do by returning {@link #NOT_HANDLED} - * </li> - * <li>Throw a {@link IOException} to indicate specific fail message (instead of - * standard exception caller would throw - * </li> - * <li>Handle content to match (by consuming or skipping it), and return actual - * instantiated value (of type <code>targetType</code>) to use as replacement; - * value may be `null` as well as expected target type. - * </li> - * </ul> - * - * @param failureMsg Message that will be used by caller - * to indicate type of failure unless handler produces value to use - * - * @return Either {@link #NOT_HANDLED} to indicate that handler does not know - * what to do (and exception may be thrown), or value to use (possibly - * <code>null</code> + * Deprecated variant of + * {@link #handleUnexpectedToken(DeserializationContext, JavaType, JsonToken, JsonParser, String) * * @since 2.8 + * + * @deprecated Since 2.10 */ + @SuppressWarnings("javadoc") @Deprecated public Object handleUnexpectedToken(DeserializationContext ctxt, Class<?> targetType, JsonToken t, JsonParser p, @@ -269,7 +251,7 @@ public abstract class DeserializationProblemHandler String failureMsg) throws IOException { - // Calling class-version handler for backward compatibility + // Calling class-version handler for backward compatibility, as of 2.10 return handleUnexpectedToken(ctxt, targetType.getRawClass(), t, p, failureMsg); } |