findNonContextualValueDeserializer(JavaTyp
{
return _cache.findValueDeserializer(this, _factory, type);
}
-
+
/**
* Method for finding a deserializer for root-level value.
*/
@@ -707,7 +707,7 @@ public final KeyDeserializer findKeyDeserializer(JavaType keyType,
/**
* Method called to ensure that every object id encounter during processing
* are resolved.
- *
+ *
* @throws UnresolvedForwardReference
*/
public abstract void checkUnresolvedObjectId()
@@ -718,7 +718,7 @@ public abstract void checkUnresolvedObjectId()
/* Public API, type handling
/**********************************************************
*/
-
+
/**
* Convenience method, functionally equivalent to:
*
@@ -769,7 +769,7 @@ public final ObjectBuffer leaseObjectBuffer()
/**
* Method to call to return object buffer previously leased with
* {@link #leaseObjectBuffer}.
- *
+ *
* @param buf Returned object buffer
*/
public final void returnObjectBuffer(ObjectBuffer buf)
@@ -821,9 +821,9 @@ public abstract KeyDeserializer keyDeserializerInstance(Annotated annotated,
* directly created to deserialize values of a POJO property),
* to handle details of resolving
* {@link ContextualDeserializer} with given property context.
- *
+ *
* @param prop Property for which the given primary deserializer is used; never null.
- *
+ *
* @since 2.5
*/
public JsonDeserializer> handlePrimaryContextualization(JsonDeserializer> deser,
@@ -851,10 +851,10 @@ public JsonDeserializer> handlePrimaryContextualization(JsonDeserializer> de
* Given that these deserializers are not directly related to given property
* (or, in case of root value property, to any property), annotations
* accessible may or may not be relevant.
- *
+ *
* @param prop Property for which deserializer is used, if any; null
* when deserializing root values
- *
+ *
* @since 2.5
*/
public JsonDeserializer> handleSecondaryContextualization(JsonDeserializer> deser,
@@ -923,7 +923,7 @@ public Calendar constructCalendar(Date d) {
* but a Scalar value (potentially coercible from String value) is expected.
* This would typically be used to deserializer a Number, Boolean value or some other
* "simple" unstructured value type.
- *
+ *
* @param p Actual parser to read content from
* @param deser Deserializer that needs extracted String value
* @param scalarType Immediate type of scalar to extract; usually type deserializer
@@ -957,7 +957,7 @@ public String extractScalarFromObject(JsonParser p, JsonDeserializer> deser,
* NOTE: when deserializing values of properties contained in composite types,
* rather use {@link #readPropertyValue(JsonParser, BeanProperty, Class)};
* this method does not allow use of contextual annotations.
- *
+ *
* @since 2.4
*/
public T readValue(JsonParser p, Class type) throws IOException {
@@ -986,7 +986,7 @@ public T readValue(JsonParser p, JavaType type) throws IOException {
* @param p Parser that points to the first token of the value to read
* @param prop Logical property of a POJO being type
* @return Value of type {@code type} that was read
- *
+ *
* @since 2.4
*/
public T readPropertyValue(JsonParser p, BeanProperty prop, Class type) throws IOException {
@@ -1112,7 +1112,7 @@ private TreeTraversingParser _treeAsTokens(JsonNode n) throws IOException
* property (and once that is not explicitly designed as ignorable), to
* inform possibly configured {@link DeserializationProblemHandler}s and
* let it handle the problem.
- *
+ *
* @return True if there was a configured problem handler that was able to handle the
* problem
*/
@@ -1155,7 +1155,7 @@ public boolean handleUnknownProperty(JsonParser p, JsonDeserializer> deser,
* @return Key value to use
*
* @throws IOException To indicate unrecoverable problem, usually based on msg
- *
+ *
* @since 2.8
*/
public Object handleWeirdKey(Class> keyClass, String keyValue,
@@ -1201,7 +1201,7 @@ public Object handleWeirdKey(Class> keyClass, String keyValue,
* @return Property value to use
*
* @throws IOException To indicate unrecoverable problem, usually based on msg
- *
+ *
* @since 2.8
*/
public Object handleWeirdStringValue(Class> targetClass, String value,
@@ -1247,7 +1247,7 @@ public Object handleWeirdStringValue(Class> targetClass, String value,
* @return Property value to use
*
* @throws IOException To indicate unrecoverable problem, usually based on msg
- *
+ *
* @since 2.8
*/
public Object handleWeirdNumberValue(Class> targetClass, Number value,
@@ -1417,7 +1417,7 @@ public Object handleInstantiationProblem(Class> instClass, Object argument,
* 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}.
- *
+ *
* @param instClass Type that was to be instantiated
* @param p Parser that points to the JSON value to decode
*
@@ -1437,7 +1437,7 @@ public Object handleUnexpectedToken(Class> instClass, JsonParser p)
* 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}.
- *
+ *
* @param instClass Type that was to be instantiated
* @param t Token encountered that does match expected
* @param p Parser that points to the JSON value to decode
@@ -1649,13 +1649,13 @@ protected boolean _isCompatible(Class> target, Object value)
*/
/**
- * Method for deserializers to call
+ * Method for deserializers to call
* when the token encountered was of type different than what should
* be seen at that position, usually within a sequence of expected tokens.
* Note that this method will throw a {@link JsonMappingException} and no
* recovery is attempted (via {@link DeserializationProblemHandler}, as
* problem is considered to be difficult to recover from, in general.
- *
+ *
* @since 2.9
*/
public void reportWrongTokenException(JsonDeserializer> deser,
@@ -1665,15 +1665,15 @@ public void reportWrongTokenException(JsonDeserializer> deser,
msg = _format(msg, msgArgs);
throw wrongTokenException(getParser(), deser.handledType(), expToken, msg);
}
-
+
/**
- * Method for deserializers to call
+ * Method for deserializers to call
* when the token encountered was of type different than what should
* be seen at that position, usually within a sequence of expected tokens.
* Note that this method will throw a {@link JsonMappingException} and no
* recovery is attempted (via {@link DeserializationProblemHandler}, as
* problem is considered to be difficult to recover from, in general.
- *
+ *
* @since 2.9
*/
public void reportWrongTokenException(JavaType targetType,
@@ -1685,13 +1685,13 @@ public void reportWrongTokenException(JavaType targetType,
}
/**
- * Method for deserializers to call
+ * Method for deserializers to call
* when the token encountered was of type different than what should
* be seen at that position, usually within a sequence of expected tokens.
* Note that this method will throw a {@link JsonMappingException} and no
* recovery is attempted (via {@link DeserializationProblemHandler}, as
* problem is considered to be difficult to recover from, in general.
- *
+ *
* @since 2.9
*/
public void reportWrongTokenException(Class> targetType,
@@ -1801,7 +1801,7 @@ public T reportPropertyInputMismatch(JavaType targetType, String propertyNam
String msg, Object... msgArgs) throws JsonMappingException
{
return reportPropertyInputMismatch(targetType.getRawClass(), propertyName, msg, msgArgs);
- }
+ }
/**
* Helper method used to indicate a problem with input in cases where specific
@@ -1836,10 +1836,10 @@ public void reportWrongTokenException(JsonParser p,
msg = _format(msg, msgArgs);
throw wrongTokenException(p, expToken, msg);
}
-
+
/**
* Helper method for reporting a problem with unhandled unknown property.
- *
+ *
* @param instanceOrClass Either value being populated (if one has been
* instantiated), or Class that indicates type that would be (or
* have been) instantiated
@@ -1877,7 +1877,7 @@ public void reportMissingContent(String msg, Object... msgArgs) throws JsonMappi
/* is not considered possible: POJO definition problems
/**********************************************************
*/
-
+
/**
* Helper method called to indicate problem in POJO (serialization) definitions or settings
* regarding specific Java type, unrelated to actual JSON content to map.
@@ -1958,7 +1958,7 @@ public JsonMappingException wrongTokenException(JsonParser p, Class> targetTyp
msg = _colonConcat(msg, extra);
return MismatchedInputException.from(p, targetType, msg);
}
-
+
@Deprecated // since 2.9
public JsonMappingException wrongTokenException(JsonParser p, JsonToken expToken,
String msg)
@@ -1988,11 +1988,11 @@ public JsonMappingException weirdKeyException(Class> keyClass, String keyValue
* Note that most of the time this method should NOT be called; instead,
* {@link #handleWeirdStringValue} should be called which will call this method
* if necessary.
- *
+ *
* @param value String value from input being deserialized
* @param instClass Type that String should be deserialized into
* @param msgBase Message that describes specific problem
- *
+ *
* @since 2.1
*/
public JsonMappingException weirdStringException(String value, Class> instClass,
@@ -2134,13 +2134,13 @@ public JsonMappingException endOfInputException(Class> instClass) {
/* ones.
/**********************************************************
*/
-
+
/**
* Fallback method that may be called if no other reportXxx
* is applicable -- but only in that case.
*
* @since 2.8
- *
+ *
* @deprecated Since 2.9: use a more specific method, or {@link #reportBadDefinition(JavaType, String)},
* or {@link #reportInputMismatch} instead
*/
@@ -2157,9 +2157,9 @@ public void reportMappingException(String msg, Object... msgArgs)
* Note that application code should almost always call
* one of handleXxx
methods, or {@link #reportMappingException(String, Object...)}
* instead.
- *
+ *
* @since 2.6
- *
+ *
* @deprecated Since 2.9 use more specific error reporting methods instead
*/
@Deprecated
@@ -2173,7 +2173,7 @@ public JsonMappingException mappingException(String message) {
* Note that application code should almost always call
* one of handleXxx
methods, or {@link #reportMappingException(String, Object...)}
* instead.
- *
+ *
* @since 2.6
*
* @deprecated Since 2.9 use more specific error reporting methods instead
@@ -2185,7 +2185,7 @@ public JsonMappingException mappingException(String msg, Object... msgArgs) {
/**
* Helper method for constructing generic mapping exception for specified type
- *
+ *
* @deprecated Since 2.8 use {@link #handleUnexpectedToken(Class, JsonParser)} instead
*/
@Deprecated
diff --git a/src/main/java/com/fasterxml/jackson/databind/DeserializationFeature.java b/src/main/java/com/fasterxml/jackson/databind/DeserializationFeature.java
index 00a1528479..2a3d82ec33 100644
--- a/src/main/java/com/fasterxml/jackson/databind/DeserializationFeature.java
+++ b/src/main/java/com/fasterxml/jackson/databind/DeserializationFeature.java
@@ -82,11 +82,11 @@ public enum DeserializationFeature implements ConfigFeature
* Feature is disabled by default, meaning that "untyped" integral
* numbers will by default be deserialized using {@link java.lang.Integer}
* if value fits.
- *
+ *
* @since 2.6
*/
USE_LONG_FOR_INTS(false),
-
+
/**
* Feature that determines whether JSON Array is mapped to
* Object[]
or {@code List} when binding
@@ -153,7 +153,7 @@ public enum DeserializationFeature implements ConfigFeature
*
* Feature is enabled by default so that exception is thrown for missing or invalid
* type information.
- *
+ *
* @since 2.2
*/
FAIL_ON_INVALID_SUBTYPE(true),
@@ -170,7 +170,7 @@ public enum DeserializationFeature implements ConfigFeature
* keys. New features may be added to control additional cases.
*
* Feature is disabled by default so that no exception is thrown.
- *
+ *
* @since 2.3
*/
FAIL_ON_READING_DUP_TREE_KEY(false),
@@ -197,7 +197,7 @@ public enum DeserializationFeature implements ConfigFeature
*
* Feature is enabled by default, so that unknown Object Ids will result in an
* exception being thrown, at the end of deserialization.
- *
+ *
* @since 2.5
*/
FAIL_ON_UNRESOLVED_OBJECT_IDS(true),
@@ -218,7 +218,7 @@ public enum DeserializationFeature implements ConfigFeature
*
* Feature is disabled by default, so that no exception is thrown for missing creator
* property values, unless they are explicitly marked as `required`.
- *
+ *
* @since 2.6
*/
FAIL_ON_MISSING_CREATOR_PROPERTIES(false),
@@ -269,7 +269,7 @@ public enum DeserializationFeature implements ConfigFeature
* @since 2.9
*/
FAIL_ON_TRAILING_TOKENS(false),
-
+
/**
* Feature that determines whether Jackson code should catch
* and wrap {@link Exception}s (but never {@link Error}s!)
@@ -311,7 +311,7 @@ public enum DeserializationFeature implements ConfigFeature
* Feature is disabled by default.
*/
ACCEPT_SINGLE_VALUE_AS_ARRAY(false),
-
+
/**
* Feature that determines whether it is acceptable to coerce single value array (in JSON)
* values to the corresponding value type. This is basically the opposite of the {@link #ACCEPT_SINGLE_VALUE_AS_ARRAY}
@@ -319,7 +319,7 @@ public enum DeserializationFeature implements ConfigFeature
*
* NOTE: only single wrapper Array is allowed: if multiple attempted, exception
* will be thrown.
- *
+ *
* Feature is disabled by default.
* @since 2.4
*/
@@ -342,7 +342,7 @@ public enum DeserializationFeature implements ConfigFeature
/* Value conversion features
/******************************************************
*/
-
+
/**
* Feature that can be enabled to allow JSON empty String
* value ("") to be bound as `null` for POJOs and other structured
@@ -372,7 +372,7 @@ public enum DeserializationFeature implements ConfigFeature
* to be equivalent of JSON null.
*
* Feature is disabled by default.
- *
+ *
* @since 2.5
*/
ACCEPT_EMPTY_ARRAY_AS_NULL_OBJECT(false),
@@ -386,7 +386,7 @@ public enum DeserializationFeature implements ConfigFeature
* will be thrown.
*
* Feature is enabled by default.
- *
+ *
* @since 2.6
*/
ACCEPT_FLOAT_AS_INT(true),
@@ -405,16 +405,16 @@ public enum DeserializationFeature implements ConfigFeature
READ_ENUMS_USING_TO_STRING(false),
/**
- * Feature that allows unknown Enum values to be parsed as null values.
+ * Feature that allows unknown Enum values to be parsed as null values.
* If disabled, unknown Enum values will throw exceptions.
*
* Note that in some cases this will in effect ignore unknown {@code Enum} values,
- * e.g. when the unknown values are used as keys of {@link java.util.EnumMap}
+ * e.g. when the unknown values are used as keys of {@link java.util.EnumMap}
* or values of {@link java.util.EnumSet}: this because these data structures cannot
* store {@code null} values.
*
* Feature is disabled by default.
- *
+ *
* @since 2.0
*/
READ_UNKNOWN_ENUM_VALUES_AS_NULL(false),
@@ -443,7 +443,7 @@ public enum DeserializationFeature implements ConfigFeature
* This is the counterpart to {@link SerializationFeature#WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS}.
*
* Feature is enabled by default, to support most accurate time values possible.
- *
+ *
* @since 2.2
*/
READ_DATE_TIMESTAMPS_AS_NANOSECONDS(true),
@@ -467,7 +467,7 @@ public enum DeserializationFeature implements ConfigFeature
*
* Taking above into account, this feature is supported only by extension modules for
* Joda and Java 8 date/time datatypes.
- *
+ *
* @since 2.2
*/
ADJUST_DATES_TO_CONTEXT_TIME_ZONE(true),
@@ -489,16 +489,16 @@ public enum DeserializationFeature implements ConfigFeature
* feature: only consider that if there are actual perceived problems.
*
* Feature is enabled by default.
- *
+ *
* @since 2.1
*/
EAGER_DESERIALIZER_FETCH(true)
-
+
;
private final boolean _defaultState;
private final int _mask;
-
+
private DeserializationFeature(boolean defaultState) {
_defaultState = defaultState;
_mask = (1 << ordinal());
diff --git a/src/main/java/com/fasterxml/jackson/databind/InjectableValues.java b/src/main/java/com/fasterxml/jackson/databind/InjectableValues.java
index 9f773c3ab8..9d170c3458 100644
--- a/src/main/java/com/fasterxml/jackson/databind/InjectableValues.java
+++ b/src/main/java/com/fasterxml/jackson/databind/InjectableValues.java
@@ -16,7 +16,7 @@ public abstract class InjectableValues
* POJO instance in which value will be injected if it is available
* (will be available when injected via field or setter; not available
* when injected via constructor or factory method argument).
- *
+ *
* @param valueId Object that identifies value to inject; may be a simple
* name or more complex identifier object, whatever provider needs
* @param ctxt Deserialization context
@@ -44,7 +44,7 @@ public static class Std
private static final long serialVersionUID = 1L;
protected final Map _values;
-
+
public Std() {
this(new HashMap());
}
@@ -62,7 +62,7 @@ public Std addValue(Class> classKey, Object value) {
_values.put(classKey.getName(), value);
return this;
}
-
+
@Override
public Object findInjectableValue(Object valueId, DeserializationContext ctxt,
BeanProperty forProperty, Object beanInstance) throws JsonMappingException
diff --git a/src/main/java/com/fasterxml/jackson/databind/JavaType.java b/src/main/java/com/fasterxml/jackson/databind/JavaType.java
index 5c5695d8f9..01407051d7 100644
--- a/src/main/java/com/fasterxml/jackson/databind/JavaType.java
+++ b/src/main/java/com/fasterxml/jackson/databind/JavaType.java
@@ -37,7 +37,7 @@ public abstract class JavaType
protected final int _hash;
/**
- * Optional handler (codec) that can be attached to indicate
+ * Optional handler (codec) that can be attached to indicate
* what to use for handling (serializing, deserializing) values of
* this specific type.
*
@@ -58,7 +58,7 @@ public abstract class JavaType
/**
* Whether entities defined with this type should be handled using
* static typing (as opposed to dynamic runtime type) or not.
- *
+ *
* @since 2.2
*/
protected final boolean _asStatic;
@@ -74,7 +74,7 @@ public abstract class JavaType
*
* @param raw "Raw" (type-erased) class for this type
* @param additionalHash Additional hash code to use, in addition
- * to hash code of the class name
+ * to hash code of the class name
* @param valueHandler internal handler (serializer/deserializer)
* to apply for this type
* @param typeHandler internal type handler (type serializer/deserializer)
@@ -97,7 +97,7 @@ protected JavaType(Class> raw, int additionalHash,
*
* @since 2.7
*/
- protected JavaType(JavaType base)
+ protected JavaType(JavaType base)
{
_class = base._class;
_hash = base._hash;
@@ -116,7 +116,7 @@ protected JavaType(JavaType base)
* If type does not have a content type (which is the case with
* SimpleType
), {@link IllegalArgumentException}
* will be thrown.
- *
+ *
* @return Newly created type instance
*
* @since 2.7
@@ -131,7 +131,7 @@ protected JavaType(JavaType base)
* The main use case is to allow forcing of specific root value serialization type,
* and specifically in resolving serializers for contained types (element types
* for arrays, Collections and Maps).
- *
+ *
* @since 2.2
*/
public abstract JavaType withStaticTyping();
@@ -176,7 +176,7 @@ protected JavaType(JavaType base)
*
* This mutant factory method will construct a new instance that is identical to
* this instance, except that it will have specified value handler assigned.
- *
+ *
* @param h Handler to pass to new instance created
* @return Newly created type instance with same type information, specified handler
*/
@@ -235,7 +235,7 @@ public JavaType withHandlersFrom(JavaType src) {
*/
public abstract JavaType refine(Class> rawType, TypeBindings bindings,
JavaType superClass, JavaType[] superInterfaces);
-
+
/**
* Legacy method used for forcing sub-typing of this type into
* type specified by specific type erasure.
@@ -405,7 +405,7 @@ public final boolean isRecordType() {
* this type should use static typing (as opposed to dynamic typing).
* Note that while value of 'true' does mean that static typing is to
* be used, value of 'false' may still be overridden by other settings.
- *
+ *
* @since 2.2
*/
public final boolean useStaticType() { return _asStatic; }
@@ -433,7 +433,7 @@ public final boolean isRecordType() {
@Override
public abstract JavaType containedType(int index);
-
+
@Deprecated // since 2.7
@Override
public abstract String containedTypeName(int index);
@@ -449,7 +449,7 @@ public Class> getParameterSource() {
/* Extended API beyond ResolvedType
/**********************************************************************
*/
-
+
// NOTE: not defined in Resolved type
/**
* Convenience method that is functionally same as:
@@ -557,7 +557,7 @@ public JavaType containedTypeOrUnknown(int index) {
*
* @since 2.7
*/
- public Object getContentTypeHandler() { return null; }
+ public Object getContentTypeHandler() { return null; }
/**
* @since 2.6
@@ -581,7 +581,7 @@ public boolean hasHandlers() {
/* Support for producing signatures
/**********************************************************************
*/
-
+
//public abstract String toCanonical();
/**
@@ -595,18 +595,18 @@ public boolean hasHandlers() {
public String getGenericSignature() {
StringBuilder sb = new StringBuilder(40);
getGenericSignature(sb);
- return sb.toString();
+ return sb.toString();
}
/**
- *
+ *
* @param sb StringBuilder to append signature to
- *
+ *
* @return StringBuilder that was passed in; returned to allow
* call chaining
*/
public abstract StringBuilder getGenericSignature(StringBuilder sb);
-
+
/**
* Method for accessing signature without generic
* type information, in form compatible with all versions
@@ -624,9 +624,9 @@ public String getErasedSignature() {
* type information, in form compatible with all versions
* of JVM, and specifically used for type descriptions
* when generating byte code.
- *
+ *
* @param sb StringBuilder to append signature to
- *
+ *
* @return StringBuilder that was passed in; returned to allow
* call chaining
*/
diff --git a/src/main/java/com/fasterxml/jackson/databind/JsonDeserializer.java b/src/main/java/com/fasterxml/jackson/databind/JsonDeserializer.java
index 75e5164d14..108f999954 100644
--- a/src/main/java/com/fasterxml/jackson/databind/JsonDeserializer.java
+++ b/src/main/java/com/fasterxml/jackson/databind/JsonDeserializer.java
@@ -52,14 +52,14 @@ public abstract class JsonDeserializer
/* Main deserialization methods
/**********************************************************
*/
-
+
/**
* Method that can be called to ask implementation to deserialize
* JSON content into the value type this serializer handles.
* Returned instance is to be constructed by method itself.
*
* Pre-condition for this method is that the parser points to the
- * first event that is part of value to deserializer (and which
+ * first event that is part of value to deserializer (and which
* is never JSON 'null' literal, more on this below): for simple
* types it may be the only value; and for structured types the
* Object start marker or a FIELD_NAME.
@@ -141,14 +141,14 @@ public T deserialize(JsonParser p, DeserializationContext ctxt, T intoValue)
* should not rely on current default implementation.
* Implementation is mostly provided to avoid compilation errors with older
* code.
- *
+ *
* @param typeDeserializer Deserializer to use for handling type information
*/
public Object deserializeWithType(JsonParser p, DeserializationContext ctxt,
TypeDeserializer typeDeserializer)
throws IOException, JacksonException
{
- // We could try calling
+ // We could try calling
return typeDeserializer.deserializeTypedFromAny(p, ctxt);
}
@@ -193,7 +193,7 @@ public JsonDeserializer unwrappingDeserializer(NameTransformer unwrapper) {
* delegate anything; or it does not want any changes), should either
* throw {@link UnsupportedOperationException} (if operation does not
* make sense or is not allowed); or return this deserializer as is.
- *
+ *
* @since 2.1
*/
public JsonDeserializer> replaceDelegatee(JsonDeserializer> delegatee) {
@@ -257,10 +257,10 @@ public JsonDeserializer> replaceDelegatee(JsonDeserializer> delegatee) {
* another deserializer for actual deserialization, by delegating
* calls. If so, will return immediate delegate (which itself may
* delegate to further deserializers); otherwise will return null.
- *
+ *
* @return Deserializer this deserializer delegates calls to, if null;
* null otherwise.
- *
+ *
* @since 2.1
*/
public JsonDeserializer> getDelegatee() {
@@ -276,7 +276,7 @@ public JsonDeserializer> getDelegatee() {
* This is only to be used for error reporting and diagnostics
* purposes (most commonly, to accompany "unknown property"
* exception).
- *
+ *
* @since 2.0
*/
public Collection getKnownPropertyNames() {
@@ -300,7 +300,7 @@ public Collection getKnownPropertyNames() {
* {@link #getNullAccessPattern()} returns.
*
* Default implementation simply returns null.
- *
+ *
* @since 2.6 Added to replace earlier no-arguments variant
*/
@Override
@@ -405,11 +405,11 @@ public AccessPattern getEmptyAccessPattern() {
* {@link com.fasterxml.jackson.databind.deser.BeanDeserializer})
* do implement this feature, and may return reader instance, depending on exact
* configuration of instance (which is based on type, and referring property).
- *
+ *
* @return ObjectIdReader used for resolving possible Object Identifier
* value, instead of full value serialization, if deserializer can do that;
* null if no Object Id is expected.
- *
+ *
* @since 2.0
*/
public ObjectIdReader getObjectIdReader() { return null; }
@@ -417,7 +417,7 @@ public AccessPattern getEmptyAccessPattern() {
/**
* Method needed by {@link BeanDeserializerFactory} to properly link
* managed- and back-reference pairs.
- *
+ *
* @since 2.2 (was moved out of BeanDeserializerBase
)
*/
public SettableBeanProperty findBackReference(String refName)
diff --git a/src/main/java/com/fasterxml/jackson/databind/JsonMappingException.java b/src/main/java/com/fasterxml/jackson/databind/JsonMappingException.java
index e71f086322..44f43ace31 100644
--- a/src/main/java/com/fasterxml/jackson/databind/JsonMappingException.java
+++ b/src/main/java/com/fasterxml/jackson/databind/JsonMappingException.java
@@ -330,7 +330,7 @@ public static JsonMappingException from(SerializerProvider ctxt, String msg, Thr
private static JsonGenerator _generator(SerializerProvider ctxt) {
return (ctxt == null) ? null : ctxt.getGenerator();
}
-
+
/**
* Factory method used when "upgrading" an {@link IOException} into
* {@link JsonMappingException}: usually only needed to comply with
@@ -445,7 +445,7 @@ public StringBuilder getPathReference(StringBuilder sb)
_appendPathDesc(sb);
return sb;
}
-
+
/**
* Method called to prepend a reference information in front of
* current path
@@ -492,7 +492,7 @@ public void prependPath(Reference r)
public String getLocalizedMessage() {
return _buildMessage();
}
-
+
/**
* Method is overridden so that we can properly inject description
* of problem path, if such is defined.
diff --git a/src/main/java/com/fasterxml/jackson/databind/JsonNode.java b/src/main/java/com/fasterxml/jackson/databind/JsonNode.java
index 9cf727ea75..6a80c40cb6 100644
--- a/src/main/java/com/fasterxml/jackson/databind/JsonNode.java
+++ b/src/main/java/com/fasterxml/jackson/databind/JsonNode.java
@@ -64,7 +64,7 @@ public enum OverwriteMode {
/**
* Mode in which explicit {@code NullNode}s may be replaced but no other
- * node types.
+ * node types.
*/
NULLS,
@@ -86,7 +86,7 @@ public enum OverwriteMode {
/* Construction, related
/**********************************************************
*/
-
+
protected JsonNode() { }
/**
@@ -100,9 +100,9 @@ protected JsonNode() { }
* Note: return type is guaranteed to have same type as the
* node method is called on; which is why method is declared
* with local generic type.
- *
+ *
* @since 2.0
- *
+ *
* @return Node that is either a copy of this node (and all non-leaf
* children); or, for immutable leaf nodes, node itself.
*/
@@ -237,12 +237,12 @@ public Iterator fieldNames() {
/**
* Method for locating node specified by given JSON pointer instances.
- * Method will never return null; if no matching node exists,
+ * Method will never return null; if no matching node exists,
* will return a node for which {@link #isMissingNode()} returns true.
- *
+ *
* @return Node that matches given JSON Pointer: if no match exists,
* will return a node for which {@link #isMissingNode()} returns true.
- *
+ *
* @since 2.3
*/
@Override
@@ -268,13 +268,13 @@ public final JsonNode at(JsonPointer ptr)
* Note that if the same expression is used often, it is preferable to construct
* {@link JsonPointer} instance once and reuse it: this method will not perform
* any caching of compiled expressions.
- *
+ *
* @param jsonPtrExpr Expression to compile as a {@link JsonPointer}
* instance
- *
+ *
* @return Node that matches given JSON Pointer: if no match exists,
* will return a node for which {@link TreeNode#isMissingNode()} returns true.
- *
+ *
* @since 2.3
*/
@Override
@@ -331,7 +331,7 @@ public final boolean isNumber() {
}
/**
- *
+ *
* @return True if this node represents an integral (integer)
* numeric JSON value
*/
@@ -350,7 +350,7 @@ public final boolean isNumber() {
* is possible that conversion would be possible from other numeric
* types -- to check if this is possible, use
* {@link #canConvertToInt()} instead.
- *
+ *
* @return True if the value contained by this node is stored as Java short
*/
public boolean isShort() { return false; }
@@ -362,7 +362,7 @@ public final boolean isNumber() {
* is possible that conversion would be possible from other numeric
* types -- to check if this is possible, use
* {@link #canConvertToInt()} instead.
- *
+ *
* @return True if the value contained by this node is stored as Java int
*/
public boolean isInt() { return false; }
@@ -374,7 +374,7 @@ public final boolean isNumber() {
* is possible that conversion would be possible from other numeric
* types -- to check if this is possible, use
* {@link #canConvertToLong()} instead.
- *
+ *
* @return True if the value contained by this node is stored as Java long
*/
public boolean isLong() { return false; }
@@ -435,7 +435,7 @@ public final boolean isBinary() {
* from JSON String into Number; so even if this method returns false,
* it is possible that {@link #asInt} could still succeed
* if node is a JSON String representing integral number, or boolean.
- *
+ *
* @since 2.0
*/
public boolean canConvertToInt() { return false; }
@@ -451,7 +451,7 @@ public final boolean isBinary() {
* from JSON String into Number; so even if this method returns false,
* it is possible that {@link #asLong} could still succeed
* if node is a JSON String representing integral number, or boolean.
- *
+ *
* @since 2.0
*/
public boolean canConvertToLong() { return false; }
@@ -630,14 +630,14 @@ public byte[] binaryValue() throws IOException {
* defaultValue
in cases where null value would be returned;
* either for missing nodes (trying to access missing property, or element
* at invalid item for array) or explicit nulls.
- *
+ *
* @since 2.4
*/
public String asText(String defaultValue) {
String str = asText();
return (str == null) ? defaultValue : str;
}
-
+
/**
* Method that will try to convert value of this node to a Java int .
* Numbers are coerced using default Java rules; booleans convert to 0 (false)
@@ -679,7 +679,7 @@ public int asInt(int defaultValue) {
public long asLong() {
return asLong(0L);
}
-
+
/**
* Method that will try to convert value of this node to a Java long .
* Numbers are coerced using default Java rules; booleans convert to 0 (false)
@@ -693,7 +693,7 @@ public long asLong() {
public long asLong(long defaultValue) {
return defaultValue;
}
-
+
/**
* Method that will try to convert value of this node to a Java double .
* Numbers are coerced using default Java rules; booleans convert to 0.0 (false)
@@ -707,7 +707,7 @@ public long asLong(long defaultValue) {
public double asDouble() {
return asDouble(0.0);
}
-
+
/**
* Method that will try to convert value of this node to a Java double .
* Numbers are coerced using default Java rules; booleans convert to 0.0 (false)
@@ -735,7 +735,7 @@ public double asDouble(double defaultValue) {
public boolean asBoolean() {
return asBoolean(false);
}
-
+
/**
* Method that will try to convert value of this node to a Java boolean .
* JSON booleans map naturally; integer numbers other than 0 map to true, and
@@ -919,7 +919,7 @@ public final JsonNode requiredAt(final JsonPointer path) throws IllegalArgumentE
* method will return true
for such properties.
*
* @param fieldName Name of element to check
- *
+ *
* @return True if this node is a JSON Object node, and has a property
* entry with specified name (with any value, including null value)
*/
@@ -945,7 +945,7 @@ public boolean has(String fieldName) {
* null values.
*
* @param index Index to check
- *
+ *
* @return True if this node is a JSON Object node, and has a property
* entry with specified name (with any value, including null value)
*/
@@ -961,7 +961,7 @@ public boolean has(int index) {
*
* node.get(fieldName) != null && !node.get(fieldName).isNull()
*
- *
+ *
* @since 2.1
*/
public boolean hasNonNull(String fieldName) {
@@ -977,7 +977,7 @@ public boolean hasNonNull(String fieldName) {
*
* node.get(index) != null && !node.get(index).isNull()
*
- *
+ *
* @since 2.1
*/
public boolean hasNonNull(int index) {
@@ -1027,9 +1027,9 @@ public Iterator> fields() {
* Method for finding a JSON Object field with specified name in this
* node or its child nodes, and returning value it has.
* If no matching field is found in this node or its descendants, returns null.
- *
+ *
* @param fieldName Name of field to look for
- *
+ *
* @return Value of first matching node found, if any; null if none
*/
public abstract JsonNode findValue(String fieldName);
@@ -1040,7 +1040,7 @@ public Iterator> fields() {
* so possible children of result nodes are not included.
* If no matching fields are found in this node or its descendants, returns
* an empty List.
- *
+ *
* @param fieldName Name of field to look for
*/
public final List findValues(String fieldName)
@@ -1064,28 +1064,28 @@ public final List findValuesAsText(String fieldName)
}
return result;
}
-
+
/**
* Method similar to {@link #findValue}, but that will return a
* "missing node" instead of null if no field is found. Missing node
* is a specific kind of node for which {@link #isMissingNode}
* returns true; and all value access methods return empty or
* missing value.
- *
+ *
* @param fieldName Name of field to look for
- *
+ *
* @return Value of first matching node found; or if not found, a
* "missing node" (non-null instance that has no value)
*/
public abstract JsonNode findPath(String fieldName);
-
+
/**
* Method for finding a JSON Object that contains specified field,
* within this node or its descendants.
* If no matching field is found in this node or its descendants, returns null.
- *
+ *
* @param fieldName Name of field to look for
- *
+ *
* @return Value of first matching node found, if any; null if none
*/
public abstract JsonNode findParent(String fieldName);
@@ -1094,9 +1094,9 @@ public final List findValuesAsText(String fieldName)
* Method for finding a JSON Object that contains specified field,
* within this node or its descendants.
* If no matching field is found in this node or its descendants, returns null.
- *
+ *
* @param fieldName Name of field to look for
- *
+ *
* @return Value of first matching node found, if any; null if none
*/
public final List findParents(String fieldName)
@@ -1256,7 +1256,7 @@ public ObjectNode withObject(JsonPointer ptr,
*
* NOTE: before Jackson 2.14 behavior was always that of non-expression usage;
* that is, {@code exprOrProperty} was always considered as a simple property name.
- *
+ *
* @deprecated Since 2.14 use {@code withObject(String)} instead
*/
@Deprecated // since 2.14
@@ -1407,8 +1407,8 @@ public ArrayNode withArray(JsonPointer ptr,
* Default implementation simply delegates to passed in comparator
,
* with this
as the first argument, and other
as
* the second argument.
- *
- * @param comparator Object called to compare two scalar {@link JsonNode}
+ *
+ * @param comparator Object called to compare two scalar {@link JsonNode}
* instances, and return either 0 (are equals) or non-zero (not equal)
*
* @since 2.6
@@ -1416,13 +1416,13 @@ public ArrayNode withArray(JsonPointer ptr,
public boolean equals(Comparator comparator, JsonNode other) {
return comparator.compare(this, other) == 0;
}
-
+
/*
/**********************************************************
/* Overridden standard methods
/**********************************************************
*/
-
+
/**
* Method that will produce (as of Jackson 2.10) valid JSON using
* default settings of databind, as String.
@@ -1450,7 +1450,7 @@ public boolean equals(Comparator comparator, JsonNode other) {
public String toPrettyString() {
return toString();
}
-
+
/**
* Equality for node objects is defined as full (deep) value
* equality. This means that it is possible to compare complete
diff --git a/src/main/java/com/fasterxml/jackson/databind/JsonSerializer.java b/src/main/java/com/fasterxml/jackson/databind/JsonSerializer.java
index 11c01b24a4..b45b48061e 100644
--- a/src/main/java/com/fasterxml/jackson/databind/JsonSerializer.java
+++ b/src/main/java/com/fasterxml/jackson/databind/JsonSerializer.java
@@ -37,7 +37,7 @@
*
* In addition, to support per-property annotations (to configure aspects
* of serialization on per-property basis), serializers may want
- * to implement
+ * to implement
* {@link com.fasterxml.jackson.databind.ser.ContextualSerializer},
* which allows specialization of serializers: call to
* {@link com.fasterxml.jackson.databind.ser.ContextualSerializer#createContextual}
@@ -69,7 +69,7 @@ public abstract class JsonSerializer
*
* Default implementation just returns serializer as-is,
* indicating that no unwrapped variant exists
- *
+ *
* @param unwrapper Name transformation to use to convert between names
* of unwrapper properties
*/
@@ -83,7 +83,7 @@ public JsonSerializer unwrappingSerializer(NameTransformer unwrapper) {
* delegate anything; or it does not want any changes), should either
* throw {@link UnsupportedOperationException} (if operation does not
* make sense or is not allowed); or return this serializer as is.
- *
+ *
* @since 2.1
*/
public JsonSerializer replaceDelegatee(JsonSerializer> delegatee) {
@@ -187,7 +187,7 @@ public void serializeWithType(T value, JsonGenerator gen, SerializerProvider ser
* of empty values).
*
* Default implementation will consider only null values to be empty.
- *
+ *
* @deprecated Since 2.5 Use {@link #isEmpty(SerializerProvider, Object)} instead;
* will be removed from 3.0
*/
@@ -204,13 +204,13 @@ public boolean isEmpty(T value) {
* Default implementation will consider only null values to be empty.
*
* NOTE: replaces {@link #isEmpty(Object)}, which was deprecated in 2.5
- *
+ *
* @since 2.5
*/
public boolean isEmpty(SerializerProvider provider, T value) {
return (value == null);
}
-
+
/**
* Method that can be called to see whether this serializer instance
* will use Object Id to handle cyclic references.
@@ -228,16 +228,16 @@ public boolean usesObjectId() {
public boolean isUnwrappingSerializer() {
return false;
}
-
+
/**
* Accessor that can be used to determine if this serializer uses
* another serializer for actual serialization, by delegating
* calls. If so, will return immediate delegate (which itself may
* delegate to further serializers); otherwise will return null.
- *
+ *
* @return Serializer this serializer delegates calls to, if null;
* null otherwise.
- *
+ *
* @since 2.1
*/
public JsonSerializer> getDelegatee() {
@@ -266,7 +266,7 @@ public Iterator properties() {
/**
* Default implementation simply calls {@link JsonFormatVisitorWrapper#expectAnyFormat(JavaType)}.
- *
+ *
* @since 2.1
*/
@Override
diff --git a/src/main/java/com/fasterxml/jackson/databind/MapperFeature.java b/src/main/java/com/fasterxml/jackson/databind/MapperFeature.java
index 9128be37b0..c48ff1df26 100644
--- a/src/main/java/com/fasterxml/jackson/databind/MapperFeature.java
+++ b/src/main/java/com/fasterxml/jackson/databind/MapperFeature.java
@@ -84,7 +84,7 @@ public enum MapperFeature implements ConfigFeature
* Feature is enabled by default.
*/
AUTO_DETECT_CREATORS(true),
-
+
/**
* Feature that determines whether non-static fields are recognized as
* properties.
@@ -99,12 +99,12 @@ public enum MapperFeature implements ConfigFeature
* Feature is enabled by default.
*/
AUTO_DETECT_FIELDS(true),
-
+
/**
* Feature that determines whether regular "getter" methods are
* automatically detected based on standard Bean naming convention
* or not. If yes, then all public zero-argument methods that
- * start with prefix "get"
+ * start with prefix "get"
* are considered as getters.
* If disabled, only methods explicitly annotated are considered getters.
*
@@ -333,7 +333,7 @@ public enum MapperFeature implements ConfigFeature
/* View-related features
/******************************************************
*/
-
+
/**
* Feature that determines whether properties that have no view
* annotations are included in JSON serialization views (see
@@ -351,7 +351,7 @@ public enum MapperFeature implements ConfigFeature
* Feature is enabled by default.
*/
DEFAULT_VIEW_INCLUSION(true),
-
+
/*
/******************************************************
/* Generic output features
@@ -411,7 +411,7 @@ public enum MapperFeature implements ConfigFeature
* letters. Overhead for names that are already lower-case should be negligible.
*
* Feature is disabled by default.
- *
+ *
* @since 2.5
*/
ACCEPT_CASE_INSENSITIVE_PROPERTIES(false),
@@ -440,7 +440,7 @@ public enum MapperFeature implements ConfigFeature
* setting instead.
*
* Feature is disabled by default.
- *
+ *
* @since 2.10
*/
ACCEPT_CASE_INSENSITIVE_VALUES(false),
@@ -454,7 +454,7 @@ public enum MapperFeature implements ConfigFeature
* If disabled, wrapper name is only used for wrapping (if anything).
*
* Feature is disabled by default.
- *
+ *
* @since 2.1
*/
USE_WRAPPER_NAME_AS_PROPERTY_NAME(false),
@@ -577,7 +577,7 @@ public enum MapperFeature implements ConfigFeature
*
* Feature is disabled by default in 2.x for backwards compatibility reasons: it will become
* default setting (and feature likely removed) in 3.0.
- *
+ *
* @since 2.11
*/
BLOCK_UNSAFE_POLYMORPHIC_BASE_TYPES(false),
@@ -614,7 +614,7 @@ private MapperFeature(boolean defaultState) {
_defaultState = defaultState;
_mask = (1L << ordinal());
}
-
+
@Override
public boolean enabledByDefault() { return _defaultState; }
diff --git a/src/main/java/com/fasterxml/jackson/databind/MappingIterator.java b/src/main/java/com/fasterxml/jackson/databind/MappingIterator.java
index 3b55f75c07..d36a8f408a 100644
--- a/src/main/java/com/fasterxml/jackson/databind/MappingIterator.java
+++ b/src/main/java/com/fasterxml/jackson/databind/MappingIterator.java
@@ -26,12 +26,12 @@ public class MappingIterator implements Iterator, Closeable
* State in which iterator is closed
*/
protected final static int STATE_CLOSED = 0;
-
+
/**
* State in which value read failed
*/
protected final static int STATE_NEED_RESYNC = 1;
-
+
/**
* State in which no recovery is needed, but "hasNextValue()" needs
* to be called first
@@ -77,13 +77,13 @@ public class MappingIterator implements Iterator, Closeable
* but caller wants to try to read more elements.
*/
protected final JsonStreamContext _seqContext;
-
+
/**
* If not null, "value to update" instead of creating a new instance
* for each call.
*/
protected final T _updatedValue;
-
+
/**
* Flag that indicates whether input {@link JsonParser} should be closed
* when we are done or not; generally only called when caller did not
@@ -96,7 +96,7 @@ public class MappingIterator implements Iterator, Closeable
/* Parsing state
/**********************************************************
*/
-
+
/**
* State of the iterator
*/
@@ -107,7 +107,7 @@ public class MappingIterator implements Iterator, Closeable
/* Construction
/**********************************************************
*/
-
+
/**
* @param managedParser Whether we "own" the {@link JsonParser} passed or not:
* if true, it was created by {@link ObjectReader} and code here needs to
@@ -190,7 +190,7 @@ public boolean hasNext()
return (Boolean) _handleIOException(e);
}
}
-
+
@SuppressWarnings("unchecked")
@Override
public T next()
@@ -208,7 +208,7 @@ public T next()
public void remove() {
throw new UnsupportedOperationException();
}
-
+
@Override
public void close() throws IOException {
if (_state != STATE_CLOSED) {
@@ -300,9 +300,9 @@ public T nextValue() throws IOException
/**
* Convenience method for reading all entries accessible via
* this iterator; resulting container will be a {@link java.util.ArrayList}.
- *
+ *
* @return List of entries read
- *
+ *
* @since 2.2
*/
public List readAll() throws IOException {
@@ -312,9 +312,9 @@ public List readAll() throws IOException {
/**
* Convenience method for reading all entries accessible via
* this iterator
- *
+ *
* @return List of entries read (same as passed-in argument)
- *
+ *
* @since 2.2
*/
public > L readAll(L resultList) throws IOException
@@ -328,7 +328,7 @@ public > L readAll(L resultList) throws IOException
/**
* Convenience method for reading all entries accessible via
* this iterator
- *
+ *
* @since 2.5
*/
public > C readAll(C results) throws IOException
@@ -338,7 +338,7 @@ public > C readAll(C results) throws IOException
}
return results;
}
-
+
/*
/**********************************************************
/* Extended API, accessors
@@ -347,7 +347,7 @@ public > C readAll(C results) throws IOException
/**
* Accessor for getting underlying parser this iterator uses.
- *
+ *
* @since 2.2
*/
public JsonParser getParser() {
@@ -358,7 +358,7 @@ public JsonParser getParser() {
* Accessor for accessing {@link FormatSchema} that the underlying parser
* (as per {@link #getParser}) is using, if any; only parser of schema-aware
* formats use schemas.
- *
+ *
* @since 2.2
*/
public FormatSchema getParserSchema() {
@@ -370,9 +370,9 @@ public FormatSchema getParserSchema() {
*
* iterator.getParser().getCurrentLocation()
*
- *
+ *
* @return Location of the input stream of the underlying parser
- *
+ *
* @since 2.2.1
*/
public JsonLocation getCurrentLocation() {
@@ -411,7 +411,7 @@ protected void _resync() throws IOException
protected R _throwNoSuchElement() {
throw new NoSuchElementException();
}
-
+
protected R _handleMappingException(JsonMappingException e) {
throw new RuntimeJsonMappingException(e.getMessage(), e);
}
diff --git a/src/main/java/com/fasterxml/jackson/databind/MappingJsonFactory.java b/src/main/java/com/fasterxml/jackson/databind/MappingJsonFactory.java
index a7939f63e1..5151641831 100644
--- a/src/main/java/com/fasterxml/jackson/databind/MappingJsonFactory.java
+++ b/src/main/java/com/fasterxml/jackson/databind/MappingJsonFactory.java
@@ -55,13 +55,13 @@ public JsonFactory copy()
// note: as with base class, must NOT copy mapper reference
return new MappingJsonFactory(this, null);
}
-
+
/*
/**********************************************************
/* Format detection functionality (since 1.8)
/**********************************************************
*/
-
+
/**
* Sub-classes need to override this method
*/
diff --git a/src/main/java/com/fasterxml/jackson/databind/Module.java b/src/main/java/com/fasterxml/jackson/databind/Module.java
index 3ae41f0767..12463fdb88 100644
--- a/src/main/java/com/fasterxml/jackson/databind/Module.java
+++ b/src/main/java/com/fasterxml/jackson/databind/Module.java
@@ -30,7 +30,7 @@ public abstract class Module
/* Simple accessors
/**********************************************************
*/
-
+
/**
* Method that returns a display that can be used by Jackson
* for informational purposes, as well as in associating extensions with
@@ -61,13 +61,13 @@ public abstract class Module
public Object getTypeId() {
return getClass().getName();
}
-
+
/*
/**********************************************************
/* Life-cycle: registration
/**********************************************************
*/
-
+
/**
* Method called by {@link ObjectMapper} when module is registered.
* It is called to let module register functionality it provides,
@@ -107,9 +107,9 @@ public static interface SetupContext
/* Simple accessors
/**********************************************************
*/
-
+
/**
- * Method that returns version information about {@link ObjectMapper}
+ * Method that returns version information about {@link ObjectMapper}
* that implements this context. Modules can use this to choose
* different settings or initialization order; or even decide to fail
* set up completely if version is compatible with module.
@@ -132,7 +132,7 @@ public static interface SetupContext
* however, instance will always be of that type.
* This is why return value is declared generic, to allow caller to
* specify context to often avoid casting.
- *
+ *
* @since 2.0
*/
public C getOwner();
@@ -143,19 +143,19 @@ public static interface SetupContext
*
* NOTE: since it is possible that other modules might change or replace
* TypeFactory, use of this method adds order-dependency for registrations.
- *
+ *
* @since 2.0
*/
public TypeFactory getTypeFactory();
-
+
public boolean isEnabled(MapperFeature f);
-
+
public boolean isEnabled(DeserializationFeature f);
public boolean isEnabled(SerializationFeature f);
public boolean isEnabled(JsonFactory.Feature f);
-
+
public boolean isEnabled(JsonParser.Feature f);
public boolean isEnabled(JsonGenerator.Feature f);
@@ -184,17 +184,17 @@ public static interface SetupContext
* @since 2.8
*/
public MutableConfigOverride configOverride(Class> type);
-
+
/*
/**********************************************************
/* Handler registration; serializers/deserializers
/**********************************************************
*/
-
+
/**
* Method that module can use to register additional deserializers to use for
* handling types.
- *
+ *
* @param d Object that can be called to find deserializer for types supported
* by module (null returned for non-supported types)
*/
@@ -206,11 +206,11 @@ public static interface SetupContext
* they are always serialized from String values)
*/
public void addKeyDeserializers(KeyDeserializers s);
-
+
/**
* Method that module can use to register additional serializers to use for
* handling types.
- *
+ *
* @param s Object that can be called to find serializer for types supported
* by module (null returned for non-supported types)
*/
@@ -228,11 +228,11 @@ public static interface SetupContext
/* Handler registration; other
/**********************************************************
*/
-
+
/**
* Method that module can use to register additional modifier objects to
* customize configuration and construction of bean deserializers.
- *
+ *
* @param mod Modifier to register
*/
public void addBeanDeserializerModifier(BeanDeserializerModifier mod);
@@ -240,7 +240,7 @@ public static interface SetupContext
/**
* Method that module can use to register additional modifier objects to
* customize configuration and construction of bean serializers.
- *
+ *
* @param mod Modifier to register
*/
public void addBeanSerializerModifier(BeanSerializerModifier mod);
@@ -249,7 +249,7 @@ public static interface SetupContext
* Method that module can use to register additional
* {@link AbstractTypeResolver} instance, to handle resolution of
* abstract to concrete types (either by defaulting, or by materializing).
- *
+ *
* @param resolver Resolver to add.
*/
public void addAbstractTypeResolver(AbstractTypeResolver resolver);
@@ -258,16 +258,16 @@ public static interface SetupContext
* Method that module can use to register additional
* {@link TypeModifier} instance, which can augment {@link com.fasterxml.jackson.databind.JavaType}
* instances constructed by {@link com.fasterxml.jackson.databind.type.TypeFactory}.
- *
+ *
* @param modifier to add
*/
public void addTypeModifier(TypeModifier modifier);
/**
* Method that module can use to register additional {@link com.fasterxml.jackson.databind.deser.ValueInstantiator}s,
- * by adding {@link ValueInstantiators} object that gets called when
+ * by adding {@link ValueInstantiators} object that gets called when
* instantatiator is needed by a deserializer.
- *
+ *
* @param instantiators Object that can provide {@link com.fasterxml.jackson.databind.deser.ValueInstantiator}s for
* constructing POJO values during deserialization
*/
@@ -287,7 +287,7 @@ public static interface SetupContext
* Method for registering specified {@link AnnotationIntrospector} as the highest
* priority introspector (will be chained with existing introspector(s) which
* will be used as fallbacks for cases this introspector does not handle)
- *
+ *
* @param ai Annotation introspector to register.
*/
public void insertAnnotationIntrospector(AnnotationIntrospector ai);
@@ -296,7 +296,7 @@ public static interface SetupContext
* Method for registering specified {@link AnnotationIntrospector} as the lowest
* priority introspector, chained with existing introspector(s) and called
* as fallback for cases not otherwise handled.
- *
+ *
* @param ai Annotation introspector to register.
*/
public void appendAnnotationIntrospector(AnnotationIntrospector ai);
@@ -320,7 +320,7 @@ public static interface SetupContext
* @since 2.9
*/
public void registerSubtypes(Collection> subtypes);
-
+
/**
* Method used for defining mix-in annotations to use for augmenting
* specified class or interface.
@@ -351,7 +351,7 @@ public static interface SetupContext
/**
* Method that may be used to override naming strategy that is used
* by {@link ObjectMapper}.
- *
+ *
* @since 2.3
*/
public void setNamingStrategy(PropertyNamingStrategy naming);
diff --git a/src/main/java/com/fasterxml/jackson/databind/ObjectMapper.java b/src/main/java/com/fasterxml/jackson/databind/ObjectMapper.java
index d16d83a39f..d606d028e7 100644
--- a/src/main/java/com/fasterxml/jackson/databind/ObjectMapper.java
+++ b/src/main/java/com/fasterxml/jackson/databind/ObjectMapper.java
@@ -68,7 +68,7 @@
// Or if you prefer JSON Tree representation:
JsonNode root = mapper.readTree(newState);
// and find values by, for example, using a {@link com.fasterxml.jackson.core.JsonPointer} expression:
- int age = root.at("/personal/age").getValueAsInt();
+ int age = root.at("/personal/age").getValueAsInt();
*
* The main conversion API is defined in {@link ObjectCodec}, so that
@@ -77,7 +77,7 @@
* however, usually only for cases where dependency to {@link ObjectMapper} is
* either not possible (from Streaming API), or undesireable (when only relying
* on Streaming API).
- *
+ *
* Mapper instances are fully thread-safe provided that ALL configuration of the
* instance occurs before ANY read or write calls. If configuration of a mapper instance
* is modified after first usage, changes may or may not take effect, and configuration
@@ -114,7 +114,7 @@
*
* Notes on security: use "default typing" feature (see {@link #enableDefaultTyping()})
* is a potential security risk, if used with untrusted content (content generated by
- * untrusted external parties). If so, you may want to construct a custom
+ * untrusted external parties). If so, you may want to construct a custom
* {@link TypeResolverBuilder} implementation to limit possible types to instantiate,
* (using {@link #setDefaultTyping}).
*/
@@ -309,7 +309,7 @@ public TypeDeserializer buildTypeDeserializer(DeserializationConfig config,
public TypeSerializer buildTypeSerializer(SerializationConfig config,
JavaType baseType, Collection subtypes)
{
- return useForType(baseType) ? super.buildTypeSerializer(config, baseType, subtypes) : null;
+ return useForType(baseType) ? super.buildTypeSerializer(config, baseType, subtypes) : null;
}
/**
@@ -454,7 +454,7 @@ public boolean useForType(JavaType t)
* same field or method. They can be further masked by sub-classes:
* you can think of it as injecting annotations between the target
* class and its sub-classes (or interfaces)
- *
+ *
* @since 2.6 (earlier was a simple {@link java.util.Map}
*/
protected SimpleMixInResolver _mixIns;
@@ -518,7 +518,7 @@ public boolean useForType(JavaType t)
* registered; kept track of iff {@link MapperFeature#IGNORE_DUPLICATE_MODULE_REGISTRATIONS}
* is enabled, so that duplicate registration calls can be ignored
* (to avoid adding same handlers multiple times, mostly).
- *
+ *
* @since 2.5
*/
protected Set _registeredModuleTypes;
@@ -587,7 +587,7 @@ public ObjectMapper(JsonFactory jf) {
/**
* Copy-constructor, mostly used to support {@link #copy}.
- *
+ *
* @since 2.1
*/
protected ObjectMapper(ObjectMapper src)
@@ -595,7 +595,7 @@ protected ObjectMapper(ObjectMapper src)
this(src, null);
}
-
+
/**
* Copy-constructor, mostly used to support {@link #copyWith(JsonFactory)}.
* @since 2.14
@@ -637,7 +637,7 @@ protected ObjectMapper(ObjectMapper src, JsonFactory factory)
* for constructing necessary {@link JsonParser}s and/or
* {@link JsonGenerator}s, and uses given providers for accessing
* serializers and deserializers.
- *
+ *
* @param jf JsonFactory to use: if null, a new {@link MappingJsonFactory} will be constructed
* @param sp SerializerProvider to use: if null, a {@link SerializerProvider} will be constructed
* @param dc Blueprint deserialization context instance to use for creating
@@ -680,7 +680,7 @@ public ObjectMapper(JsonFactory jf,
if (needOrder ^ _serializationConfig.isEnabled(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY)) {
configure(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY, needOrder);
}
-
+
_serializerProvider = (sp == null) ? new DefaultSerializerProvider.Impl() : sp;
_deserializationContext = (dc == null) ?
new DefaultDeserializationContext.Impl(BeanDeserializerFactory.instance) : dc;
@@ -692,7 +692,7 @@ public ObjectMapper(JsonFactory jf,
/**
* Overridable helper method used to construct default {@link ClassIntrospector}
* to use.
- *
+ *
* @since 2.5
*/
protected ClassIntrospector defaultClassIntrospector() {
@@ -704,7 +704,7 @@ protected ClassIntrospector defaultClassIntrospector() {
/* Methods sub-classes MUST override
/**********************************************************
*/
-
+
/**
* Method for creating a new {@link ObjectMapper} instance that
* has same initial configuration as this instance. Note that this
@@ -717,7 +717,7 @@ protected ClassIntrospector defaultClassIntrospector() {
* are NOT shared, which means that the new instance may be re-configured
* before use; meaning that it behaves the same way as if an instance
* was constructed from scratch.
- *
+ *
* @since 2.1
*/
public ObjectMapper copy() {
@@ -757,11 +757,11 @@ protected void _checkInvalidCopy(Class> exp)
/* ObjectReader/ObjectWriter implementations
/**********************************************************
*/
-
+
/**
* Factory method sub-classes must override, to produce {@link ObjectReader}
* instances of proper sub-type
- *
+ *
* @since 2.5
*/
protected ObjectReader _newReader(DeserializationConfig config) {
@@ -771,7 +771,7 @@ protected ObjectReader _newReader(DeserializationConfig config) {
/**
* Factory method sub-classes must override, to produce {@link ObjectReader}
* instances of proper sub-type
- *
+ *
* @since 2.5
*/
protected ObjectReader _newReader(DeserializationConfig config,
@@ -783,7 +783,7 @@ protected ObjectReader _newReader(DeserializationConfig config,
/**
* Factory method sub-classes must override, to produce {@link ObjectWriter}
* instances of proper sub-type
- *
+ *
* @since 2.5
*/
protected ObjectWriter _newWriter(SerializationConfig config) {
@@ -793,7 +793,7 @@ protected ObjectWriter _newWriter(SerializationConfig config) {
/**
* Factory method sub-classes must override, to produce {@link ObjectWriter}
* instances of proper sub-type
- *
+ *
* @since 2.5
*/
protected ObjectWriter _newWriter(SerializationConfig config, FormatSchema schema) {
@@ -803,7 +803,7 @@ protected ObjectWriter _newWriter(SerializationConfig config, FormatSchema schem
/**
* Factory method sub-classes must override, to produce {@link ObjectWriter}
* instances of proper sub-type
- *
+ *
* @since 2.5
*/
protected ObjectWriter _newWriter(SerializationConfig config,
@@ -836,13 +836,13 @@ public Version version() {
* Method for registering a module that can extend functionality
* provided by this mapper; for example, by adding providers for
* custom serializers and deserializers.
- *
+ *
* @param module Module to register
*/
public ObjectMapper registerModule(Module module)
{
_assertNotNull("module", module);
- // Let's ensure we have access to name and version information,
+ // Let's ensure we have access to name and version information,
// even if we do not have immediate use for either. This way we know
// that they will be available from beginning
String name = module.getModuleName();
@@ -896,7 +896,7 @@ public C getOwner() {
public TypeFactory getTypeFactory() {
return _typeFactory;
}
-
+
@Override
public boolean isEnabled(MapperFeature f) {
return ObjectMapper.this.isEnabled(f);
@@ -953,9 +953,9 @@ public void addBeanDeserializerModifier(BeanDeserializerModifier modifier) {
DeserializerFactory df = _deserializationContext._factory.withDeserializerModifier(modifier);
_deserializationContext = _deserializationContext.with(df);
}
-
+
// // // Methods for registering handlers: serializers
-
+
@Override
public void addSerializers(Serializers s) {
_serializerFactory = _serializerFactory.withAdditionalSerializers(s);
@@ -965,14 +965,14 @@ public void addSerializers(Serializers s) {
public void addKeySerializers(Serializers s) {
_serializerFactory = _serializerFactory.withAdditionalKeySerializers(s);
}
-
+
@Override
public void addBeanSerializerModifier(BeanSerializerModifier modifier) {
_serializerFactory = _serializerFactory.withSerializerModifier(modifier);
}
// // // Methods for registering handlers: other
-
+
@Override
public void addAbstractTypeResolver(AbstractTypeResolver resolver) {
DeserializerFactory df = _deserializationContext._factory.withAbstractTypeResolver(resolver);
@@ -1003,7 +1003,7 @@ public void insertAnnotationIntrospector(AnnotationIntrospector ai) {
_deserializationConfig = _deserializationConfig.withInsertedAnnotationIntrospector(ai);
_serializationConfig = _serializationConfig.withInsertedAnnotationIntrospector(ai);
}
-
+
@Override
public void appendAnnotationIntrospector(AnnotationIntrospector ai) {
_deserializationConfig = _deserializationConfig.withAppendedAnnotationIntrospector(ai);
@@ -1029,7 +1029,7 @@ public void registerSubtypes(Collection> subtypes) {
public void setMixInAnnotations(Class> target, Class> mixinSource) {
addMixIn(target, mixinSource);
}
-
+
@Override
public void addDeserializationProblemHandler(DeserializationProblemHandler handler) {
addHandler(handler);
@@ -1052,7 +1052,7 @@ public void setNamingStrategy(PropertyNamingStrategy naming) {
* registerModule(module);
* }
*
- *
+ *
* @since 2.2
*/
public ObjectMapper registerModules(Module... modules)
@@ -1071,7 +1071,7 @@ public ObjectMapper registerModules(Module... modules)
* registerModule(module);
* }
*
- *
+ *
* @since 2.2
*/
public ObjectMapper registerModules(Iterable extends Module> modules)
@@ -1108,7 +1108,7 @@ public Set getRegisteredModuleIds()
*
* Note that method does not do any caching, so calls should be considered
* potentially expensive.
- *
+ *
* @since 2.2
*/
public static List findModules() {
@@ -1121,7 +1121,7 @@ public static List findModules() {
*
* Note that method does not do any caching, so calls should be considered
* potentially expensive.
- *
+ *
* @since 2.2
*/
public static List findModules(ClassLoader classLoader)
@@ -1425,7 +1425,7 @@ public SerializationConfig getSerializationConfig() {
public DeserializationConfig getDeserializationConfig() {
return _deserializationConfig;
}
-
+
/**
* Method for getting current {@link DeserializationContext}.
*
@@ -1442,7 +1442,7 @@ public DeserializationContext getDeserializationContext() {
/* Configuration: ser/deser factory, provider access
/**********************************************************
*/
-
+
/**
* Method for setting specific {@link SerializerFactory} to use
* for constructing (bean) serializers.
@@ -1562,7 +1562,7 @@ public ObjectMapper setMixInResolver(ClassIntrospector.MixInResolver resolver)
}
return this;
}
-
+
public Class> findMixInClassFor(Class> cls) {
return _mixIns.findMixInClassFor(cls);
}
@@ -1610,7 +1610,7 @@ public VisibilityChecker> getVisibilityChecker() {
* This default checker is used as the base visibility:
* per-class overrides (both via annotations and per-type config overrides)
* can further change these settings.
- *
+ *
* @since 2.6
*/
public ObjectMapper setVisibility(VisibilityChecker> vc) {
@@ -1634,11 +1634,11 @@ public ObjectMapper setVisibility(VisibilityChecker> vc) {
*
* which would make all member fields serializable without further annotations,
* instead of just public fields (default setting).
- *
+ *
* @param forMethod Type of property descriptor affected (field, getter/isGetter,
* setter, creator)
* @param visibility Minimum visibility to require for the property descriptors of type
- *
+ *
* @return Modified mapper instance (that is, "this"), to allow chaining
* of configuration calls
*/
@@ -1674,7 +1674,7 @@ public ObjectMapper setSubtypeResolver(SubtypeResolver str) {
* may lead to unavailability of core Jackson annotations.
* If you want to combine handling of multiple introspectors,
* have a look at {@link com.fasterxml.jackson.databind.introspect.AnnotationIntrospectorPair}.
- *
+ *
* @see com.fasterxml.jackson.databind.introspect.AnnotationIntrospectorPair
*/
public ObjectMapper setAnnotationIntrospector(AnnotationIntrospector ai) {
@@ -1688,14 +1688,14 @@ public ObjectMapper setAnnotationIntrospector(AnnotationIntrospector ai) {
* by this mapper instance for serialization and deserialization,
* specifying them separately so that different introspection can be
* used for different aspects
- *
+ *
* @since 2.1
- *
+ *
* @param serializerAI {@link AnnotationIntrospector} to use for configuring
* serialization
* @param deserializerAI {@link AnnotationIntrospector} to use for configuring
* deserialization
- *
+ *
* @see com.fasterxml.jackson.databind.introspect.AnnotationIntrospectorPair
*/
public ObjectMapper setAnnotationIntrospectors(AnnotationIntrospector serializerAI,
@@ -1736,11 +1736,11 @@ public ObjectMapper setAccessorNaming(AccessorNamingStrategy.Provider s) {
/**
* Method for specifying {@link PrettyPrinter} to use when "default pretty-printing"
* is enabled (by enabling {@link SerializationFeature#INDENT_OUTPUT})
- *
+ *
* @param pp Pretty printer to use by default.
- *
+ *
* @return This mapper, useful for call-chaining
- *
+ *
* @since 2.6
*/
public ObjectMapper setDefaultPrettyPrinter(PrettyPrinter pp) {
@@ -1787,7 +1787,7 @@ public PolymorphicTypeValidator getPolymorphicTypeValidator() {
/* Configuration: global-default/per-type override settings
/**********************************************************
*/
-
+
/**
* Convenience method, equivalent to calling:
*
@@ -1990,7 +1990,7 @@ public ObjectMapper activateDefaultTyping(PolymorphicTypeValidator ptv,
if (includeAs == JsonTypeInfo.As.EXTERNAL_PROPERTY) {
throw new IllegalArgumentException("Cannot use includeAs of "+includeAs);
}
-
+
TypeResolverBuilder> typer = _constructDefaultTypeResolverBuilder(applicability, ptv);
// we'll always use full class name, when using defaulting
typer = typer.init(JsonTypeInfo.Id.CLASS, null);
@@ -2067,7 +2067,7 @@ public ObjectMapper setDefaultTyping(TypeResolverBuilder> typer) {
/* Default typing (automatic polymorphic types): deprecated (pre-2.10)
/**********************************************************
*/
-
+
/**
* @deprecated Since 2.10 use {@link #activateDefaultTyping(PolymorphicTypeValidator)} instead
*/
@@ -2295,7 +2295,7 @@ public ObjectMapper clearProblemHandlers() {
* by-passing some of checks applied to other configuration methods.
* Also keep in mind that as with all configuration of {@link ObjectMapper},
* this is only thread-safe if done before calling any deserialization methods.
- *
+ *
* @since 2.4
*/
public ObjectMapper setConfig(DeserializationConfig config) {
@@ -2326,7 +2326,7 @@ public void setFilters(FilterProvider filterProvider) {
* however, sometimes
* this method is more convenient. For example, some frameworks only allow configuring
* of ObjectMapper instances and not {@link ObjectWriter}s.
- *
+ *
* @since 2.6
*/
public ObjectMapper setFilterProvider(FilterProvider filterProvider) {
@@ -2337,11 +2337,11 @@ public ObjectMapper setFilterProvider(FilterProvider filterProvider) {
/**
* Method that will configure default {@link Base64Variant} that
* byte[]
serializers and deserializers will use.
- *
+ *
* @param v Base64 variant to use
- *
+ *
* @return This mapper, for convenience to allow chaining
- *
+ *
* @since 2.1
*/
public ObjectMapper setBase64Variant(Base64Variant v) {
@@ -2361,7 +2361,7 @@ public ObjectMapper setBase64Variant(Base64Variant v) {
* by-passing some of checks applied to other configuration methods.
* Also keep in mind that as with all configuration of {@link ObjectMapper},
* this is only thread-safe if done before calling any serialization methods.
- *
+ *
* @since 2.4
*/
public ObjectMapper setConfig(SerializationConfig config) {
@@ -2369,7 +2369,7 @@ public ObjectMapper setConfig(SerializationConfig config) {
_serializationConfig = config;
return this;
}
-
+
/*
/**********************************************************
/* Configuration, other
@@ -2424,7 +2424,7 @@ public DateFormat getDateFormat() {
// arbitrary choice but let's do:
return _serializationConfig.getDateFormat();
}
-
+
/**
* Method for configuring {@link HandlerInstantiator} to use for creating
* instances of handlers (such as serializers, deserializers, type and type
@@ -2438,7 +2438,7 @@ public Object setHandlerInstantiator(HandlerInstantiator hi)
_serializationConfig = _serializationConfig.with(hi);
return this;
}
-
+
/**
* Method for configuring {@link InjectableValues} which used to find
* values to inject.
@@ -2577,7 +2577,7 @@ public ObjectMapper enable(SerializationFeature first,
_serializationConfig = _serializationConfig.with(first, f);
return this;
}
-
+
/**
* Method for disabling specified {@link DeserializationConfig} features.
* Modifies and returns this instance; no new object is created.
@@ -2724,7 +2724,7 @@ public ObjectMapper enable(JsonParser.Feature... features) {
}
return this;
}
-
+
/**
* Method for disabling specified {@link com.fasterxml.jackson.core.JsonParser.Feature}s
* for parser instances this object mapper creates.
@@ -2743,7 +2743,7 @@ public ObjectMapper disable(JsonParser.Feature... features) {
}
return this;
}
-
+
/*
/**********************************************************
/* Configuration, simple features: JsonGenerator.Feature
@@ -2813,7 +2813,7 @@ public ObjectMapper disable(JsonGenerator.Feature... features) {
/* Configuration, simple features: JsonFactory.Feature
/**********************************************************
*/
-
+
/**
* Convenience method, equivalent to:
*
@@ -2843,7 +2843,7 @@ public boolean isEnabled(StreamReadFeature f) {
public boolean isEnabled(StreamWriteFeature f) {
return isEnabled(f.mappedFeature());
}
-
+
/*
/**********************************************************
/* Public API (from ObjectCodec): deserialization
@@ -2860,7 +2860,7 @@ public boolean isEnabled(StreamWriteFeature f) {
* container ({@link java.util.Collection} or {@link java.util.Map}.
* The reason is that due to type erasure, key and value types
* cannot be introspected when using this method.
- *
+ *
* @throws IOException if a low-level I/O problem (unexpected end-of-input,
* network error) occurs (passed through as-is without additional wrapping -- note
* that this is one case where {@link DeserializationFeature#WRAP_EXCEPTIONS}
@@ -2883,9 +2883,9 @@ public T readValue(JsonParser p, Class valueType)
* Method to deserialize JSON content into a Java type, reference
* to which is passed as argument. Type is passed using so-called
* "super type token" (see )
- * and specifically needs to be used if the root type is a
+ * and specifically needs to be used if the root type is a
* parameterized (generic) container type.
- *
+ *
* @throws IOException if a low-level I/O problem (unexpected end-of-input,
* network error) occurs (passed through as-is without additional wrapping -- note
* that this is one case where {@link DeserializationFeature#WRAP_EXCEPTIONS}
@@ -2906,10 +2906,10 @@ public T readValue(JsonParser p, TypeReference valueTypeRef)
/**
* Method to deserialize JSON content into a Java type, reference
- * to which is passed as argument. Type is passed using
+ * to which is passed as argument. Type is passed using
* Jackson specific type; instance of which can be constructed using
* {@link TypeFactory}.
- *
+ *
* @throws IOException if a low-level I/O problem (unexpected end-of-input,
* network error) occurs (passed through as-is without additional wrapping -- note
* that this is one case where {@link DeserializationFeature#WRAP_EXCEPTIONS}
@@ -2930,7 +2930,7 @@ public final T readValue(JsonParser p, ResolvedType valueType)
/**
* Type-safe overloaded method, basically alias for {@link #readValue(JsonParser, Class)}.
- *
+ *
* @throws IOException if a low-level I/O problem (unexpected end-of-input,
* network error) occurs (passed through as-is without additional wrapping -- note
* that this is one case where {@link DeserializationFeature#WRAP_EXCEPTIONS}
@@ -2947,7 +2947,7 @@ public T readValue(JsonParser p, JavaType valueType)
_assertNotNull("p", p);
return (T) _readValue(getDeserializationConfig(), p, valueType);
}
-
+
/**
* Method to deserialize JSON content as a tree {@link JsonNode}.
* Returns {@link JsonNode} that represents the root of the resulting tree, if there
@@ -2957,13 +2957,13 @@ public T readValue(JsonParser p, JavaType valueType)
* NOTE! Behavior with end-of-input (no more content) differs between this
* {@code readTree} method, and all other methods that take input source: latter
* will return "missing node", NOT {@code null}
- *
+ *
* @return a {@link JsonNode}, if valid JSON content found; null
* if input has no content to bind -- note, however, that if
* JSON null
token is found, it will be represented
* as a non-null {@link JsonNode} (one that returns true
* for {@link JsonNode#isNull()}
- *
+ *
* @throws IOException if a low-level I/O problem (unexpected end-of-input,
* network error) occurs (passed through as-is without additional wrapping -- note
* that this is one case where {@link DeserializationFeature#WRAP_EXCEPTIONS}
@@ -3064,7 +3064,7 @@ public MappingIterator readValues(JsonParser p, TypeReference valueTyp
{
return readValues(p, _typeFactory.constructType(valueTypeRef));
}
-
+
/*
/**********************************************************
/* Public API not included in ObjectCodec: deserialization
@@ -3085,16 +3085,16 @@ public MappingIterator readValues(JsonParser p, TypeReference valueTyp
* {@link StreamReadException} will be thrown.
* If no content is found from input (end-of-input), Java
* null
will be returned.
- *
+ *
* @param in Input stream used to read JSON content
* for building the JSON tree.
- *
+ *
* @return a {@link JsonNode}, if valid JSON content found; null
* if input has no content to bind -- note, however, that if
* JSON null
token is found, it will be represented
* as a non-null {@link JsonNode} (one that returns true
* for {@link JsonNode#isNull()}
- *
+ *
* @throws StreamReadException if underlying input contains invalid content
* of type {@link JsonParser} supports (JSON for default case)
*/
@@ -3229,7 +3229,7 @@ public void writeTree(JsonGenerator g, TreeNode rootNode)
g.flush();
}
}
-
+
/**
* Method to serialize given JSON Tree, using generator
* provided.
@@ -3244,7 +3244,7 @@ public void writeTree(JsonGenerator g, JsonNode rootNode)
g.flush();
}
}
-
+
/**
*
* Note: return type is co-variant, as basic ObjectCodec
@@ -3252,7 +3252,7 @@ public void writeTree(JsonGenerator g, JsonNode rootNode)
* part of core package, whereas impls are part of mapper
* package)
*/
- @Override
+ @Override
public ObjectNode createObjectNode() {
return _deserializationConfig.getNodeFactory().objectNode();
}
@@ -3282,7 +3282,7 @@ public JsonNode nullNode() {
/**
* Method for constructing a {@link JsonParser} out of JSON tree
* representation.
- *
+ *
* @param n Root node of the tree that resulting parser will read from
*/
@Override
@@ -3406,7 +3406,7 @@ public T treeToValue(TreeNode n, JavaType valueType)
* are not re-constructed through actual format representation. So if transformation
* requires actual materialization of encoded content,
* it will be necessary to do actual serialization.
- *
+ *
* @param Actual node type; usually either basic {@link JsonNode} or
* {@link com.fasterxml.jackson.databind.node.ObjectNode}
* @param fromValue Java value to convert
@@ -3427,7 +3427,7 @@ public T valueToTree(Object fromValue)
// first: disable wrapping when writing
final SerializationConfig config = getSerializationConfig().without(SerializationFeature.WRAP_ROOT_VALUE);
final DefaultSerializerProvider context = _serializerProvider(config);
-
+
// Then create TokenBuffer to use as JsonGenerator
TokenBuffer buf = context.bufferForValueConversion(this);
if (isEnabled(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS)) {
@@ -3472,13 +3472,13 @@ public boolean canSerialize(Class> type) {
* Method similar to {@link #canSerialize(Class)} but that can return
* actual {@link Throwable} that was thrown when trying to construct
* serializer: this may be useful in figuring out what the actual problem is.
- *
+ *
* @since 2.3
*/
public boolean canSerialize(Class> type, AtomicReference cause) {
return _serializerProvider(getSerializationConfig()).hasSerializerFor(type, cause);
}
-
+
/**
* Method that can be called to check whether mapper thinks
* it could deserialize an Object of given type.
@@ -3506,7 +3506,7 @@ public boolean canDeserialize(JavaType type)
* Method similar to {@link #canDeserialize(JavaType)} but that can return
* actual {@link Throwable} that was thrown when trying to construct
* serializer: this may be useful in figuring out what the actual problem is.
- *
+ *
* @since 2.3
*/
public boolean canDeserialize(JavaType type, AtomicReference cause)
@@ -3524,7 +3524,7 @@ public boolean canDeserialize(JavaType type, AtomicReference cause)
/**
* Method to deserialize JSON content from given file into given Java type.
- *
+ *
* @throws IOException if a low-level I/O problem (unexpected end-of-input,
* network error) occurs (passed through as-is without additional wrapping -- note
* that this is one case where {@link DeserializationFeature#WRAP_EXCEPTIONS}
@@ -3540,11 +3540,11 @@ public T readValue(File src, Class valueType)
{
_assertNotNull("src", src);
return (T) _readMapAndClose(_jsonFactory.createParser(src), _typeFactory.constructType(valueType));
- }
+ }
/**
* Method to deserialize JSON content from given file into given Java type.
- *
+ *
* @throws IOException if a low-level I/O problem (unexpected end-of-input,
* network error) occurs (passed through as-is without additional wrapping -- note
* that this is one case where {@link DeserializationFeature#WRAP_EXCEPTIONS}
@@ -3560,11 +3560,11 @@ public T readValue(File src, TypeReference valueTypeRef)
{
_assertNotNull("src", src);
return (T) _readMapAndClose(_jsonFactory.createParser(src), _typeFactory.constructType(valueTypeRef));
- }
+ }
/**
* Method to deserialize JSON content from given file into given Java type.
- *
+ *
* @throws IOException if a low-level I/O problem (unexpected end-of-input,
* network error) occurs (passed through as-is without additional wrapping -- note
* that this is one case where {@link DeserializationFeature#WRAP_EXCEPTIONS}
@@ -3590,7 +3590,7 @@ public T readValue(File src, JavaType valueType)
* calls {@link java.net.URL#openStream()}, meaning no special handling
* is done. If different HTTP connection options are needed you will need
* to create {@link java.io.InputStream} separately.
- *
+ *
* @throws IOException if a low-level I/O problem (unexpected end-of-input,
* network error) occurs (passed through as-is without additional wrapping -- note
* that this is one case where {@link DeserializationFeature#WRAP_EXCEPTIONS}
@@ -3606,7 +3606,7 @@ public T readValue(URL src, Class valueType)
{
_assertNotNull("src", src);
return (T) _readMapAndClose(_jsonFactory.createParser(src), _typeFactory.constructType(valueType));
- }
+ }
/**
* Same as {@link #readValue(java.net.URL, Class)} except that target specified by {@link TypeReference}.
@@ -3617,7 +3617,7 @@ public T readValue(URL src, TypeReference valueTypeRef)
{
_assertNotNull("src", src);
return (T) _readMapAndClose(_jsonFactory.createParser(src), _typeFactory.constructType(valueTypeRef));
- }
+ }
/**
* Same as {@link #readValue(java.net.URL, Class)} except that target specified by {@link JavaType}.
@@ -3643,7 +3643,7 @@ public T readValue(String content, Class valueType)
{
_assertNotNull("content", content);
return readValue(content, _typeFactory.constructType(valueType));
- }
+ }
/**
* Method to deserialize JSON content from given JSON content String.
@@ -3658,7 +3658,7 @@ public T readValue(String content, TypeReference valueTypeRef)
{
_assertNotNull("content", content);
return readValue(content, _typeFactory.constructType(valueTypeRef));
- }
+ }
/**
* Method to deserialize JSON content from given JSON content String.
@@ -3680,7 +3680,7 @@ public T readValue(String content, JavaType valueType)
} catch (IOException e) { // shouldn't really happen but being declared need to
throw JsonMappingException.fromUnexpectedIOE(e);
}
- }
+ }
@SuppressWarnings("unchecked")
public T readValue(Reader src, Class valueType)
@@ -3688,7 +3688,7 @@ public T readValue(Reader src, Class valueType)
{
_assertNotNull("src", src);
return (T) _readMapAndClose(_jsonFactory.createParser(src), _typeFactory.constructType(valueType));
- }
+ }
@SuppressWarnings({ "unchecked" })
public T readValue(Reader src, TypeReference valueTypeRef)
@@ -3696,7 +3696,7 @@ public T readValue(Reader src, TypeReference valueTypeRef)
{
_assertNotNull("src", src);
return (T) _readMapAndClose(_jsonFactory.createParser(src), _typeFactory.constructType(valueTypeRef));
- }
+ }
@SuppressWarnings("unchecked")
public T readValue(Reader src, JavaType valueType)
@@ -3704,7 +3704,7 @@ public T readValue(Reader src, JavaType valueType)
{
_assertNotNull("src", src);
return (T) _readMapAndClose(_jsonFactory.createParser(src), valueType);
- }
+ }
@SuppressWarnings("unchecked")
public T readValue(InputStream src, Class valueType)
@@ -3712,7 +3712,7 @@ public T readValue(InputStream src, Class valueType)
{
_assertNotNull("src", src);
return (T) _readMapAndClose(_jsonFactory.createParser(src), _typeFactory.constructType(valueType));
- }
+ }
@SuppressWarnings({ "unchecked" })
public T readValue(InputStream src, TypeReference valueTypeRef)
@@ -3720,7 +3720,7 @@ public T readValue(InputStream src, TypeReference valueTypeRef)
{
_assertNotNull("src", src);
return (T) _readMapAndClose(_jsonFactory.createParser(src), _typeFactory.constructType(valueTypeRef));
- }
+ }
@SuppressWarnings("unchecked")
public T readValue(InputStream src, JavaType valueType)
@@ -3728,7 +3728,7 @@ public T readValue(InputStream src, JavaType valueType)
{
_assertNotNull("src", src);
return (T) _readMapAndClose(_jsonFactory.createParser(src), valueType);
- }
+ }
@SuppressWarnings("unchecked")
public T readValue(byte[] src, Class valueType)
@@ -3736,16 +3736,16 @@ public T readValue(byte[] src, Class valueType)
{
_assertNotNull("src", src);
return (T) _readMapAndClose(_jsonFactory.createParser(src), _typeFactory.constructType(valueType));
- }
-
+ }
+
@SuppressWarnings("unchecked")
- public T readValue(byte[] src, int offset, int len,
+ public T readValue(byte[] src, int offset, int len,
Class valueType)
throws IOException, StreamReadException, DatabindException
{
_assertNotNull("src", src);
return (T) _readMapAndClose(_jsonFactory.createParser(src, offset, len), _typeFactory.constructType(valueType));
- }
+ }
@SuppressWarnings({ "unchecked" })
public T readValue(byte[] src, TypeReference valueTypeRef)
@@ -3753,15 +3753,15 @@ public T readValue(byte[] src, TypeReference valueTypeRef)
{
_assertNotNull("src", src);
return (T) _readMapAndClose(_jsonFactory.createParser(src), _typeFactory.constructType(valueTypeRef));
- }
-
+ }
+
@SuppressWarnings({ "unchecked" })
public T readValue(byte[] src, int offset, int len, TypeReference valueTypeRef)
throws IOException, StreamReadException, DatabindException
{
_assertNotNull("src", src);
return (T) _readMapAndClose(_jsonFactory.createParser(src, offset, len), _typeFactory.constructType(valueTypeRef));
- }
+ }
@SuppressWarnings("unchecked")
public T readValue(byte[] src, JavaType valueType)
@@ -3769,7 +3769,7 @@ public T readValue(byte[] src, JavaType valueType)
{
_assertNotNull("src", src);
return (T) _readMapAndClose(_jsonFactory.createParser(src), valueType);
- }
+ }
@SuppressWarnings("unchecked")
public T readValue(byte[] src, int offset, int len, JavaType valueType)
@@ -3777,7 +3777,7 @@ public T readValue(byte[] src, int offset, int len, JavaType valueType)
{
_assertNotNull("src", src);
return (T) _readMapAndClose(_jsonFactory.createParser(src, offset, len), valueType);
- }
+ }
@SuppressWarnings("unchecked")
public T readValue(DataInput src, Class valueType) throws IOException
@@ -3933,7 +3933,7 @@ public ObjectWriter writer(SerializationFeature first,
SerializationFeature... other) {
return _newWriter(getSerializationConfig().with(first, other));
}
-
+
/**
* Factory method for constructing {@link ObjectWriter} that will
* serialize objects using specified {@link DateFormat}; or, if
@@ -3942,7 +3942,7 @@ public ObjectWriter writer(SerializationFeature first,
public ObjectWriter writer(DateFormat df) {
return _newWriter(getSerializationConfig().with(df));
}
-
+
/**
* Factory method for constructing {@link ObjectWriter} that will
* serialize objects using specified JSON View (filter).
@@ -3950,7 +3950,7 @@ public ObjectWriter writer(DateFormat df) {
public ObjectWriter writerWithView(Class> serializationView) {
return _newWriter(getSerializationConfig().withView(serializationView));
}
-
+
/**
* Factory method for constructing {@link ObjectWriter} that will
* serialize objects using specified root type, instead of actual
@@ -3959,7 +3959,7 @@ public ObjectWriter writerWithView(Class> serializationView) {
* Main reason for using this method is performance, as writer is able
* to pre-fetch serializer to use before write, and if writer is used
* more than once this avoids addition per-value serializer lookups.
- *
+ *
* @since 2.5
*/
public ObjectWriter writerFor(Class> rootType) {
@@ -3976,7 +3976,7 @@ public ObjectWriter writerFor(Class> rootType) {
* Main reason for using this method is performance, as writer is able
* to pre-fetch serializer to use before write, and if writer is used
* more than once this avoids addition per-value serializer lookups.
- *
+ *
* @since 2.5
*/
public ObjectWriter writerFor(TypeReference> rootType) {
@@ -3993,7 +3993,7 @@ public ObjectWriter writerFor(TypeReference> rootType) {
* Main reason for using this method is performance, as writer is able
* to pre-fetch serializer to use before write, and if writer is used
* more than once this avoids addition per-value serializer lookups.
- *
+ *
* @since 2.5
*/
public ObjectWriter writerFor(JavaType rootType) {
@@ -4011,7 +4011,7 @@ public ObjectWriter writer(PrettyPrinter pp) {
}
return _newWriter(getSerializationConfig(), /*root type*/ null, pp);
}
-
+
/**
* Factory method for constructing {@link ObjectWriter} that will
* serialize objects using the default pretty printer for indentation
@@ -4021,7 +4021,7 @@ public ObjectWriter writerWithDefaultPrettyPrinter() {
return _newWriter(config,
/*root type*/ null, config.getDefaultPrettyPrinter());
}
-
+
/**
* Factory method for constructing {@link ObjectWriter} that will
* serialize objects using specified filter provider.
@@ -4029,12 +4029,12 @@ public ObjectWriter writerWithDefaultPrettyPrinter() {
public ObjectWriter writer(FilterProvider filterProvider) {
return _newWriter(getSerializationConfig().withFilters(filterProvider));
}
-
+
/**
* Factory method for constructing {@link ObjectWriter} that will
* pass specific schema object to {@link JsonGenerator} used for
* writing content.
- *
+ *
* @param schema Schema to pass to generator
*/
public ObjectWriter writer(FormatSchema schema) {
@@ -4045,7 +4045,7 @@ public ObjectWriter writer(FormatSchema schema) {
/**
* Factory method for constructing {@link ObjectWriter} that will
* use specified Base64 encoding variant for Base64-encoded binary data.
- *
+ *
* @since 2.1
*/
public ObjectWriter writer(Base64Variant defaultBase64) {
@@ -4055,7 +4055,7 @@ public ObjectWriter writer(Base64Variant defaultBase64) {
/**
* Factory method for constructing {@link ObjectReader} that will
* use specified character escaping details for output.
- *
+ *
* @since 2.3
*/
public ObjectWriter writer(CharacterEscapes escapes) {
@@ -4065,7 +4065,7 @@ public ObjectWriter writer(CharacterEscapes escapes) {
/**
* Factory method for constructing {@link ObjectWriter} that will
* use specified default attributes.
- *
+ *
* @since 2.3
*/
public ObjectWriter writer(ContextAttributes attrs) {
@@ -4101,7 +4101,7 @@ public ObjectWriter writerWithType(TypeReference> rootType) {
public ObjectWriter writerWithType(JavaType rootType) {
return _newWriter(getSerializationConfig(), rootType, /*PrettyPrinter*/null);
}
-
+
/*
/**********************************************************
/* Extended Public API: constructing ObjectReaders
@@ -4140,7 +4140,7 @@ public ObjectReader reader(DeserializationFeature first,
DeserializationFeature... other) {
return _newReader(getDeserializationConfig().with(first, other));
}
-
+
/**
* Factory method for constructing {@link ObjectReader} that will
* update given Object (usually Bean, but can be a Collection or Map
@@ -4161,7 +4161,7 @@ public ObjectReader readerForUpdating(Object valueToUpdate) {
/**
* Factory method for constructing {@link ObjectReader} that will
* read or update instances of specified type
- *
+ *
* @since 2.6
*/
public ObjectReader readerFor(JavaType type) {
@@ -4172,7 +4172,7 @@ public ObjectReader readerFor(JavaType type) {
/**
* Factory method for constructing {@link ObjectReader} that will
* read or update instances of specified type
- *
+ *
* @since 2.6
*/
public ObjectReader readerFor(Class> type) {
@@ -4184,7 +4184,7 @@ public ObjectReader readerFor(Class> type) {
/**
* Factory method for constructing {@link ObjectReader} that will
* read or update instances of specified type
- *
+ *
* @since 2.6
*/
public ObjectReader readerFor(TypeReference> typeRef) {
@@ -4257,7 +4257,7 @@ public ObjectReader reader(JsonNodeFactory nodeFactory) {
* Factory method for constructing {@link ObjectReader} that will
* pass specific schema object to {@link JsonParser} used for
* reading content.
- *
+ *
* @param schema Schema to pass to parser
*/
public ObjectReader reader(FormatSchema schema) {
@@ -4270,7 +4270,7 @@ public ObjectReader reader(FormatSchema schema) {
/**
* Factory method for constructing {@link ObjectReader} that will
* use specified injectable values.
- *
+ *
* @param injectableValues Injectable values to use
*/
public ObjectReader reader(InjectableValues injectableValues) {
@@ -4289,7 +4289,7 @@ public ObjectReader readerWithView(Class> view) {
/**
* Factory method for constructing {@link ObjectReader} that will
* use specified Base64 encoding variant for Base64-encoded binary data.
- *
+ *
* @since 2.1
*/
public ObjectReader reader(Base64Variant defaultBase64) {
@@ -4299,7 +4299,7 @@ public ObjectReader reader(Base64Variant defaultBase64) {
/**
* Factory method for constructing {@link ObjectReader} that will
* use specified default attributes.
- *
+ *
* @since 2.3
*/
public ObjectReader reader(ContextAttributes attrs) {
@@ -4368,7 +4368,7 @@ public ObjectReader reader(TypeReference> type) {
* Finally, this functionality is not designed to support "advanced" use
* cases, such as conversion of polymorphic values, or cases where Object Identity
* is used.
- *
+ *
* @throws IllegalArgumentException If conversion fails due to incompatible type;
* if so, root cause will contain underlying checked exception data binding
* functionality threw
@@ -4378,7 +4378,7 @@ public T convertValue(Object fromValue, Class toValueType)
throws IllegalArgumentException
{
return (T) _convert(fromValue, _typeFactory.constructType(toValueType));
- }
+ }
/**
* See {@link #convertValue(Object, Class)}
@@ -4388,7 +4388,7 @@ public T convertValue(Object fromValue, TypeReference toValueTypeRef)
throws IllegalArgumentException
{
return (T) _convert(fromValue, _typeFactory.constructType(toValueTypeRef));
- }
+ }
/**
* See {@link #convertValue(Object, Class)}
@@ -4398,7 +4398,7 @@ public T convertValue(Object fromValue, JavaType toValueType)
throws IllegalArgumentException
{
return (T) _convert(fromValue, toValueType);
- }
+ }
/**
* Actual conversion implementation: instead of using existing read
@@ -4416,7 +4416,7 @@ protected Object _convert(Object fromValue, JavaType toValueType)
// first: disable wrapping when writing
final SerializationConfig config = getSerializationConfig().without(SerializationFeature.WRAP_ROOT_VALUE);
final DefaultSerializerProvider context = _serializerProvider(config);
-
+
// Then create TokenBuffer to use as JsonGenerator
TokenBuffer buf = context.bufferForValueConversion(this);
if (isEnabled(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS)) {
@@ -4452,7 +4452,7 @@ protected Object _convert(Object fromValue, JavaType toValueType)
/**
* Convenience method similar to {@link #convertValue(Object, JavaType)} but one
- * in which
+ * in which
*
* Implementation is approximately as follows:
*
@@ -4476,13 +4476,13 @@ protected Object _convert(Object fromValue, JavaType toValueType)
* @param valueToUpdate Object to update
* @param overrides Object to conceptually serialize and merge into value to
* update; can be thought of as a provider for overrides to apply.
- *
+ *
* @return Either the first argument (`valueToUpdate`), if it is mutable; or a result of
* creating new instance that is result of "merging" values (for example, "updating" a
* Java array will create a new array)
*
* @throws JsonMappingException if there are structural incompatibilities that prevent update.
- *
+ *
* @since 2.9
*/
@SuppressWarnings("resource")
@@ -4527,7 +4527,7 @@ public T updateValue(T valueToUpdate, Object overrides)
*
* @param t The class to generate schema for
* @return Constructed JSON schema.
- *
+ *
* @deprecated Since 2.6 use external JSON Schema generator (https://github.com/FasterXML/jackson-module-jsonSchema)
* (which under the hood calls {@link #acceptJsonFormatVisitor(JavaType, JsonFormatVisitorWrapper)})
*/
@@ -4545,7 +4545,7 @@ public com.fasterxml.jackson.databind.jsonschema.JsonSchema generateJsonSchema(C
* instance for specified type.
*
* @param type Type to generate schema for (possibly with generic signature)
- *
+ *
* @since 2.1
*/
public void acceptJsonFormatVisitor(Class> type, JsonFormatVisitorWrapper visitor)
@@ -4563,7 +4563,7 @@ public void acceptJsonFormatVisitor(Class> type, JsonFormatVisitorWrapper visi
* instance for specified type.
*
* @param type Type to generate schema for (possibly with generic signature)
- *
+ *
* @since 2.1
*/
public void acceptJsonFormatVisitor(JavaType type, JsonFormatVisitorWrapper visitor)
@@ -4752,7 +4752,7 @@ protected JsonNode _readTreeAndClose(JsonParser p0) throws IOException
DeserializationConfig cfg = getDeserializationConfig();
// 27-Oct-2016, tatu: Need to inline `_initForReading()` due to
// special requirements by tree reading (no fail on eof)
-
+
cfg.initialize(p); // since 2.5
JsonToken t = p.currentToken();
if (t == null) {
diff --git a/src/main/java/com/fasterxml/jackson/databind/ObjectReader.java b/src/main/java/com/fasterxml/jackson/databind/ObjectReader.java
index b64a0527ee..b6e14c83bd 100644
--- a/src/main/java/com/fasterxml/jackson/databind/ObjectReader.java
+++ b/src/main/java/com/fasterxml/jackson/databind/ObjectReader.java
@@ -77,11 +77,11 @@ public class ObjectReader
protected final boolean _unwrapRoot;
/**
- * Filter to be consider for JsonParser.
+ * Filter to be consider for JsonParser.
* Default value to be null as filter not considered.
*/
private final TokenFilter _filter;
-
+
/*
/**********************************************************
/* Configuration that can be changed during building
@@ -103,11 +103,11 @@ public class ObjectReader
* is known, and if so, reuse it afterwards.
* This allows avoiding further deserializer lookups and increases
* performance a bit on cases where readers are reused.
- *
+ *
* @since 2.1
*/
protected final JsonDeserializer _rootDeserializer;
-
+
/**
* Instance to update with data binding; if any. If null,
* a new instance is created, if non-null, properties of
@@ -138,7 +138,7 @@ public class ObjectReader
* because format-detection only works on byte-sources. Also, if format
* cannot be detect reliably (as per detector settings),
* a {@link StreamReadException} will be thrown).
- *
+ *
* @since 2.1
*/
protected final DataFormatReaders _dataFormatReaders;
@@ -159,7 +159,7 @@ public class ObjectReader
* Lazily resolved {@link JavaType} for {@link JsonNode}
*/
protected transient JavaType _jsonNodeType;
-
+
/*
/**********************************************************
/* Life-cycle, construction
@@ -192,10 +192,10 @@ protected ObjectReader(ObjectMapper mapper, DeserializationConfig config,
_unwrapRoot = config.useRootWrapping();
_rootDeserializer = _prefetchRootDeserializer(valueType);
- _dataFormatReaders = null;
+ _dataFormatReaders = null;
_filter = null;
}
-
+
/**
* Copy constructor used for building variations.
*/
@@ -240,7 +240,7 @@ protected ObjectReader(ObjectReader base, DeserializationConfig config)
_dataFormatReaders = base._dataFormatReaders;
_filter = base._filter;
}
-
+
protected ObjectReader(ObjectReader base, JsonFactory f)
{
// may need to override ordering, based on data format capabilities
@@ -260,7 +260,7 @@ protected ObjectReader(ObjectReader base, JsonFactory f)
_dataFormatReaders = base._dataFormatReaders;
_filter = base._filter;
}
-
+
protected ObjectReader(ObjectReader base, TokenFilter filter) {
_config = base._config;
_context = base._context;
@@ -275,7 +275,7 @@ protected ObjectReader(ObjectReader base, TokenFilter filter) {
_dataFormatReaders = base._dataFormatReaders;
_filter = filter;
}
-
+
/**
* Method that will return version information stored in and read from jar
* that contains this class.
@@ -295,7 +295,7 @@ public Version version() {
/**
* Overridable factory method called by various "withXxx()" methods
- *
+ *
* @since 2.5
*/
protected ObjectReader _new(ObjectReader base, JsonFactory f) {
@@ -304,7 +304,7 @@ protected ObjectReader _new(ObjectReader base, JsonFactory f) {
/**
* Overridable factory method called by various "withXxx()" methods
- *
+ *
* @since 2.5
*/
protected ObjectReader _new(ObjectReader base, DeserializationConfig config) {
@@ -313,7 +313,7 @@ protected ObjectReader _new(ObjectReader base, DeserializationConfig config) {
/**
* Overridable factory method called by various "withXxx()" methods
- *
+ *
* @since 2.5
*/
protected ObjectReader _new(ObjectReader base, DeserializationConfig config,
@@ -327,7 +327,7 @@ protected ObjectReader _new(ObjectReader base, DeserializationConfig config,
/**
* Factory method used to create {@link MappingIterator} instances;
* either default, or custom subtype.
- *
+ *
* @since 2.5
*/
protected MappingIterator _newIterator(JsonParser p, DeserializationContext ctxt,
@@ -370,7 +370,7 @@ protected JsonToken _initForReading(DeserializationContext ctxt, JsonParser p)
* but need to do other initialization.
*
* Base implementation only sets configured {@link FormatSchema}, if any, on parser.
- *
+ *
* @since 2.8
*/
protected void _initForMultiRead(DeserializationContext ctxt, JsonParser p)
@@ -401,7 +401,7 @@ public ObjectReader with(DeserializationFeature first,
DeserializationFeature... other)
{
return _with(_config.with(first, other));
- }
+ }
/**
* Method for constructing a new reader instance that is configured
@@ -409,14 +409,14 @@ public ObjectReader with(DeserializationFeature first,
*/
public ObjectReader withFeatures(DeserializationFeature... features) {
return _with(_config.withFeatures(features));
- }
+ }
/**
* Method for constructing a new reader instance that is configured
* with specified feature disabled.
*/
public ObjectReader without(DeserializationFeature feature) {
- return _with(_config.without(feature));
+ return _with(_config.without(feature));
}
/**
@@ -426,7 +426,7 @@ public ObjectReader without(DeserializationFeature feature) {
public ObjectReader without(DeserializationFeature first,
DeserializationFeature... other) {
return _with(_config.without(first, other));
- }
+ }
/**
* Method for constructing a new reader instance that is configured
@@ -434,7 +434,7 @@ public ObjectReader without(DeserializationFeature first,
*/
public ObjectReader withoutFeatures(DeserializationFeature... features) {
return _with(_config.withoutFeatures(features));
- }
+ }
/*
/**********************************************************************
@@ -460,7 +460,7 @@ public ObjectReader with(DatatypeFeature feature) {
*/
public ObjectReader withFeatures(DatatypeFeature... features) {
return _with(_config.withFeatures(features));
- }
+ }
/**
* Method for constructing a new reader instance that is configured
@@ -469,7 +469,7 @@ public ObjectReader withFeatures(DatatypeFeature... features) {
* @since 2.14
*/
public ObjectReader without(DatatypeFeature feature) {
- return _with(_config.without(feature));
+ return _with(_config.without(feature));
}
/**
@@ -480,7 +480,7 @@ public ObjectReader without(DatatypeFeature feature) {
*/
public ObjectReader withoutFeatures(DatatypeFeature... features) {
return _with(_config.withoutFeatures(features));
- }
+ }
/*
/**********************************************************
@@ -511,7 +511,7 @@ public ObjectReader with(JsonParser.Feature feature) {
*/
public ObjectReader withFeatures(JsonParser.Feature... features) {
return _with(_config.withFeatures(features));
- }
+ }
/**
* Method for constructing a new reader instance that is configured
@@ -522,7 +522,7 @@ public ObjectReader withFeatures(JsonParser.Feature... features) {
* @return Reader instance with specified feature disabled
*/
public ObjectReader without(JsonParser.Feature feature) {
- return _with(_config.without(feature));
+ return _with(_config.without(feature));
}
/**
@@ -591,7 +591,7 @@ public ObjectReader with(FormatFeature feature) {
*/
public ObjectReader withFeatures(FormatFeature... features) {
return _with(_config.withFeatures(features));
- }
+ }
/**
* Method for constructing a new reader instance that is configured
@@ -600,7 +600,7 @@ public ObjectReader withFeatures(FormatFeature... features) {
* @since 2.7
*/
public ObjectReader without(FormatFeature feature) {
- return _with(_config.without(feature));
+ return _with(_config.without(feature));
}
/**
@@ -612,7 +612,7 @@ public ObjectReader without(FormatFeature feature) {
public ObjectReader withoutFeatures(FormatFeature... features) {
return _with(_config.withoutFeatures(features));
}
-
+
/*
/**********************************************************
/* Life-cycle, fluent factory methods, other
@@ -620,8 +620,8 @@ public ObjectReader withoutFeatures(FormatFeature... features) {
*/
/**
- * Convenience method to bind from {@link JsonPointer}.
- * {@link JsonPointerBasedFilter} is registered and will be used for parsing later.
+ * Convenience method to bind from {@link JsonPointer}.
+ * {@link JsonPointerBasedFilter} is registered and will be used for parsing later.
* @since 2.6
*/
public ObjectReader at(final String pointerExpr) {
@@ -648,7 +648,7 @@ public ObjectReader at(final JsonPointer pointer) {
*/
public ObjectReader with(DeserializationConfig config) {
return _with(config);
- }
+ }
/**
* Method for constructing a new instance with configuration that uses
@@ -687,7 +687,7 @@ public ObjectReader with(JsonNodeFactory f) {
* (that is, ones that return false
for
* {@link JsonFactory#requiresCustomCodec()}) can be used: trying
* to use one that requires custom codec will throw exception
- *
+ *
* @since 2.1
*/
public ObjectReader with(JsonFactory f) {
@@ -701,7 +701,7 @@ public ObjectReader with(JsonFactory f) {
}
return r;
}
-
+
/**
* Method for constructing a new instance with configuration that
* specifies what root name to expect for "root name unwrapping".
@@ -721,7 +721,7 @@ public ObjectReader withRootName(String rootName) {
public ObjectReader withRootName(PropertyName rootName) {
return _with(_config.withRootName(rootName));
}
-
+
/**
* Convenience method that is same as calling:
*
@@ -729,13 +729,13 @@ public ObjectReader withRootName(PropertyName rootName) {
*
* which will forcibly prevent use of root name wrapping when writing
* values with this {@link ObjectReader}.
- *
+ *
* @since 2.6
*/
public ObjectReader withoutRootName() {
return _with(_config.withRootName(PropertyName.NO_NAME));
}
-
+
/**
* Method for constructing a new instance with configuration that
* passes specified {@link FormatSchema} to {@link JsonParser} that
@@ -760,7 +760,7 @@ public ObjectReader with(FormatSchema schema)
*
* Note that the method does NOT change state of this reader, but
* rather construct and returns a newly configured instance.
- *
+ *
* @since 2.5
*/
public ObjectReader forType(JavaType valueType)
@@ -776,7 +776,7 @@ public ObjectReader forType(JavaType valueType)
}
return _new(this, _config, valueType, rootDeser,
_valueToUpdate, _schema, _injectableValues, det);
- }
+ }
/**
* Method for constructing a new reader instance that is configured
@@ -789,7 +789,7 @@ public ObjectReader forType(JavaType valueType)
*/
public ObjectReader forType(Class> valueType) {
return forType(_config.constructType(valueType));
- }
+ }
/**
* Method for constructing a new reader instance that is configured
@@ -802,7 +802,7 @@ public ObjectReader forType(Class> valueType) {
*/
public ObjectReader forType(TypeReference> valueTypeRef) {
return forType(_config.getTypeFactory().constructType(valueTypeRef.getType()));
- }
+ }
/**
* @deprecated since 2.5 Use {@link #forType(JavaType)} instead
@@ -818,7 +818,7 @@ public ObjectReader withType(JavaType valueType) {
@Deprecated
public ObjectReader withType(Class> valueType) {
return forType(_config.constructType(valueType));
- }
+ }
/**
* @deprecated since 2.5 Use {@link #forType(Class)} instead
@@ -834,11 +834,11 @@ public ObjectReader withType(java.lang.reflect.Type valueType) {
@Deprecated
public ObjectReader withType(TypeReference> valueTypeRef) {
return forType(_config.getTypeFactory().constructType(valueTypeRef.getType()));
- }
+ }
/**
* Method for constructing a new instance with configuration that
- * updates passed Object (as root value), instead of constructing
+ * updates passed Object (as root value), instead of constructing
* a new value.
*
* Note that the method does NOT change state of this reader, but
@@ -854,7 +854,7 @@ public ObjectReader withValueToUpdate(Object value)
_schema, _injectableValues, _dataFormatReaders);
}
JavaType t;
-
+
/* no real benefit from pre-fetching, as updating readers are much
* less likely to be reused, and value type may also be forced
* with a later chained call...
@@ -909,12 +909,12 @@ public ObjectReader with(Base64Variant defaultBase64) {
* Note: not all {@link JsonFactory} types can be passed: specifically, ones that
* require "custom codec" (like XML factory) will not work. Instead, use
* method that takes {@link ObjectReader} instances instead of factories.
- *
+ *
* @param readers Data formats accepted, in decreasing order of priority (that is,
* matches checked in listed order, first match wins)
- *
+ *
* @return Newly configured writer instance
- *
+ *
* @since 2.1
*/
public ObjectReader withFormatDetection(ObjectReader... readers) {
@@ -929,11 +929,11 @@ public ObjectReader withFormatDetection(ObjectReader... readers) {
* NOTE: since format detection only works with byte sources, it is possible to
* get a failure from some 'readValue()' methods. Also, if input cannot be reliably
* (enough) detected as one of specified types, an exception will be thrown.
- *
+ *
* @param readers DataFormatReaders to use for detecting underlying format.
- *
+ *
* @return Newly configured writer instance
- *
+ *
* @since 2.1
*/
public ObjectReader withFormatDetection(DataFormatReaders readers) {
@@ -974,7 +974,7 @@ public ObjectReader withoutAttribute(Object key) {
/* Overridable factory methods may override
/**********************************************************
*/
-
+
protected ObjectReader _with(DeserializationConfig newConfig) {
if (newConfig == _config) {
return this;
@@ -985,13 +985,13 @@ protected ObjectReader _with(DeserializationConfig newConfig) {
}
return r;
}
-
+
/*
/**********************************************************
/* Simple accessors
/**********************************************************
*/
-
+
public boolean isEnabled(DeserializationFeature f) {
return _config.isEnabled(f);
}
@@ -1024,7 +1024,7 @@ public boolean isEnabled(StreamReadFeature f) {
public DeserializationConfig getConfig() {
return _config;
}
-
+
/**
* @since 2.1
*/
@@ -1463,7 +1463,7 @@ public void writeTree(JsonGenerator g, TreeNode rootNode) {
/* Deserialization methods; others similar to what ObjectMapper has
/**********************************************************
*/
-
+
/**
* Method that binds content read from given input source,
* using configuration of this reader.
@@ -1768,7 +1768,7 @@ public T readValue(DataInput content, Class valueType) throws IOException
/* Deserialization methods; JsonNode ("tree")
/**********************************************************
*/
-
+
/**
* Method that reads content from given input source,
* using configuration of this reader, and binds it as JSON Tree.
@@ -1793,7 +1793,7 @@ public JsonNode readTree(InputStream src) throws IOException
}
return _bindAndCloseAsTree(_considerFilter(createParser(src), false));
}
-
+
/**
* Same as {@link #readTree(InputStream)} except content accessed through
* passed-in {@link Reader}
@@ -1836,7 +1836,7 @@ public JsonNode readTree(byte[] json) throws IOException
}
return _bindAndCloseAsTree(_considerFilter(createParser(json), false));
}
-
+
/**
* Same as {@link #readTree(InputStream)} except content read from
* passed-in byte array.
@@ -1866,7 +1866,7 @@ public JsonNode readTree(DataInput src) throws IOException
/* Deserialization methods; reading sequence of values
/**********************************************************
*/
-
+
/**
* Method for reading sequence of Objects from parser stream.
*
@@ -1885,7 +1885,7 @@ public MappingIterator readValues(JsonParser p) throws IOException
// false -> do not close as caller gave parser instance
return _newIterator(p, ctxt, _findRootDeserializer(ctxt), false);
}
-
+
/**
* Method for reading sequence of Objects from parser stream.
*
@@ -1911,10 +1911,10 @@ public MappingIterator readValues(InputStream src) throws IOException
if (_dataFormatReaders != null) {
return _detectBindAndReadValues(_dataFormatReaders.findFormat(src), false);
}
-
+
return _bindAndReadValues(_considerFilter(createParser(src), true));
}
-
+
/**
* Overloaded version of {@link #readValue(InputStream)}.
*/
@@ -1929,10 +1929,10 @@ public MappingIterator readValues(Reader src) throws IOException
p.nextToken();
return _newIterator(p, ctxt, _findRootDeserializer(ctxt), true);
}
-
+
/**
* Overloaded version of {@link #readValue(InputStream)}.
- *
+ *
* @param json String that contains JSON content to parse
*/
public MappingIterator readValues(String json) throws IOException
@@ -1966,7 +1966,7 @@ public final MappingIterator readValues(byte[] src) throws IOException {
_assertNotNull("src", src);
return readValues(src, 0, src.length);
}
-
+
/**
* Overloaded version of {@link #readValue(InputStream)}.
*/
@@ -1987,7 +1987,7 @@ public MappingIterator readValues(File src) throws IOException
* calls {@link java.net.URL#openStream()}, meaning no special handling
* is done. If different HTTP connection options are needed you will need
* to create {@link java.io.InputStream} separately.
- *
+ *
* @param src URL to read to access JSON content to parse.
*/
public MappingIterator readValues(URL src) throws IOException
@@ -2125,7 +2125,7 @@ protected final JsonNode _bindAsTree(JsonParser p) throws IOException
if (_valueToUpdate != null) {
return (JsonNode) _bind(p, _valueToUpdate);
}
-
+
// Need to inline `_initForReading()` due to tree reading handling end-of-input specially
_config.initialize(p);
if (_schema != null) {
@@ -2208,7 +2208,7 @@ protected MappingIterator _bindAndReadValues(JsonParser p) throws IOExcep
}
/**
- * Consider filter when creating JsonParser.
+ * Consider filter when creating JsonParser.
*/
protected JsonParser _considerFilter(final JsonParser p, boolean multiValue) {
// 26-Mar-2016, tatu: Need to allow multiple-matches at least if we have
@@ -2259,7 +2259,7 @@ protected Object _detectBindAndClose(DataFormatReaders.Match match, boolean forc
_reportUnkownFormat(_dataFormatReaders, match);
}
JsonParser p = match.createParserWithMatch();
- // One more thing: we Own the input stream now; and while it's
+ // One more thing: we Own the input stream now; and while it's
// not super clean way to do it, we must ensure closure so:
if (forceClosing) {
p.enable(JsonParser.Feature.AUTO_CLOSE_SOURCE);
@@ -2275,7 +2275,7 @@ protected MappingIterator _detectBindAndReadValues(DataFormatReaders.Matc
_reportUnkownFormat(_dataFormatReaders, match);
}
JsonParser p = match.createParserWithMatch();
- // One more thing: we Own the input stream now; and while it's
+ // One more thing: we Own the input stream now; and while it's
// not super clean way to do it, we must ensure closure so:
if (forceClosing) {
p.enable(JsonParser.Feature.AUTO_CLOSE_SOURCE);
@@ -2294,7 +2294,7 @@ protected JsonNode _detectBindAndCloseAsTree(InputStream in) throws IOException
p.enable(JsonParser.Feature.AUTO_CLOSE_SOURCE);
return match.getReader()._bindAndCloseAsTree(p);
}
-
+
/**
* Method called to indicate that format detection failed to detect format
* of given input
@@ -2360,7 +2360,7 @@ protected void _reportUndetectableSource(Object src) throws StreamReadException
/* Helper methods, locating deserializers etc
/**********************************************************
*/
-
+
/**
* Method called to locate deserializer for the passed root-level value.
*/
diff --git a/src/main/java/com/fasterxml/jackson/databind/ObjectWriter.java b/src/main/java/com/fasterxml/jackson/databind/ObjectWriter.java
index 744d17f395..506d7ab3ed 100644
--- a/src/main/java/com/fasterxml/jackson/databind/ObjectWriter.java
+++ b/src/main/java/com/fasterxml/jackson/databind/ObjectWriter.java
@@ -86,7 +86,7 @@ public class ObjectWriter
* @since 2.5
*/
protected final Prefetch _prefetch;
-
+
/*
/**********************************************************
/* Life-cycle, constructors
@@ -147,7 +147,7 @@ protected ObjectWriter(ObjectMapper mapper, SerializationConfig config,
: new GeneratorSettings(null, s, null, null);
_prefetch = Prefetch.empty;
}
-
+
/**
* Copy constructor used for building variations.
*/
@@ -213,7 +213,7 @@ public Version version() {
/**
* Overridable factory method called by various "withXxx()" methods
- *
+ *
* @since 2.5
*/
protected ObjectWriter _new(ObjectWriter base, JsonFactory f) {
@@ -222,7 +222,7 @@ protected ObjectWriter _new(ObjectWriter base, JsonFactory f) {
/**
* Overridable factory method called by various "withXxx()" methods
- *
+ *
* @since 2.5
*/
protected ObjectWriter _new(ObjectWriter base, SerializationConfig config) {
@@ -236,7 +236,7 @@ protected ObjectWriter _new(ObjectWriter base, SerializationConfig config) {
* Overridable factory method called by various "withXxx()" methods.
* It assumes `this` as base for settings other than those directly
* passed in.
- *
+ *
* @since 2.5
*/
protected ObjectWriter _new(GeneratorSettings genSettings, Prefetch prefetch) {
@@ -249,7 +249,7 @@ protected ObjectWriter _new(GeneratorSettings genSettings, Prefetch prefetch) {
/**
* Overridable factory method called by {@link #writeValues(OutputStream)}
* method (and its various overrides), and initializes it as necessary.
- *
+ *
* @since 2.5
*/
@SuppressWarnings("resource")
@@ -282,7 +282,7 @@ public ObjectWriter with(SerializationFeature feature) {
*/
public ObjectWriter with(SerializationFeature first, SerializationFeature... other) {
return _new(this, _config.with(first, other));
- }
+ }
/**
* Method for constructing a new instance that is configured
@@ -290,15 +290,15 @@ public ObjectWriter with(SerializationFeature first, SerializationFeature... oth
*/
public ObjectWriter withFeatures(SerializationFeature... features) {
return _new(this, _config.withFeatures(features));
- }
-
+ }
+
/**
* Method for constructing a new instance that is configured
* with specified feature disabled.
*/
public ObjectWriter without(SerializationFeature feature) {
return _new(this, _config.without(feature));
- }
+ }
/**
* Method for constructing a new instance that is configured
@@ -306,7 +306,7 @@ public ObjectWriter without(SerializationFeature feature) {
*/
public ObjectWriter without(SerializationFeature first, SerializationFeature... other) {
return _new(this, _config.without(first, other));
- }
+ }
/**
* Method for constructing a new instance that is configured
@@ -463,7 +463,7 @@ public ObjectWriter withoutFeatures(FormatFeature... features) {
*
* Note that method does NOT change state of this reader, but
* rather construct and returns a newly configured instance.
- *
+ *
* @since 2.5
*/
public ObjectWriter forType(JavaType rootType) {
@@ -474,7 +474,7 @@ public ObjectWriter forType(JavaType rootType) {
* Method that will construct a new instance that uses specific type
* as the root type for serialization, instead of runtime dynamic
* type of the root object itself.
- *
+ *
* @since 2.5
*/
public ObjectWriter forType(Class> rootType) {
@@ -485,7 +485,7 @@ public ObjectWriter forType(Class> rootType) {
* Method that will construct a new instance that uses specific type
* as the root type for serialization, instead of runtime dynamic
* type of the root object itself.
- *
+ *
* @since 2.5
*/
public ObjectWriter forType(TypeReference> rootType) {
@@ -521,7 +521,7 @@ public ObjectWriter withType(TypeReference> rootType) {
/* Life-cycle, fluent factories, other
/**********************************************************
*/
-
+
/**
* Fluent factory method that will construct a new writer instance that will
* use specified date format for serializing dates; or if null passed, one
@@ -568,7 +568,7 @@ public ObjectWriter with(PrettyPrinter pp) {
*
* Note that method does NOT change state of this reader, but
* rather construct and returns a newly configured instance.
- *
+ *
* @param rootName Root name to use, if non-empty; `null` for "use defaults",
* and empty String ("") for "do NOT add root wrapper"
*/
@@ -590,13 +590,13 @@ public ObjectWriter withRootName(PropertyName rootName) {
*
* which will forcibly prevent use of root name wrapping when writing
* values with this {@link ObjectWriter}.
- *
+ *
* @since 2.6
*/
public ObjectWriter withoutRootName() {
return _new(this, _config.withRootName(PropertyName.NO_NAME));
}
-
+
/**
* Method that will construct a new instance that uses specific format schema
* for serialization.
@@ -627,7 +627,7 @@ public ObjectWriter withSchema(FormatSchema schema) {
*/
public ObjectWriter withView(Class> view) {
return _new(this, _config.withView(view));
- }
+ }
public ObjectWriter with(Locale l) {
return _new(this, _config.with(l));
@@ -640,7 +640,7 @@ public ObjectWriter with(TimeZone tz) {
/**
* Method that will construct a new instance that uses specified default
* {@link Base64Variant} for base64 encoding
- *
+ *
* @since 2.1
*/
public ObjectWriter with(Base64Variant b64variant) {
@@ -659,7 +659,7 @@ public ObjectWriter with(CharacterEscapes escapes) {
*/
public ObjectWriter with(JsonFactory f) {
return (f == _generatorFactory) ? this : _new(this, f);
- }
+ }
/**
* @since 2.3
@@ -1002,7 +1002,7 @@ public SerializationConfig getConfig() {
public JsonFactory getFactory() {
return _generatorFactory;
}
-
+
public TypeFactory getTypeFactory() {
return _config.getTypeFactory();
}
@@ -1012,7 +1012,7 @@ public TypeFactory getTypeFactory() {
* has pre-fetched serializer to use: pre-fetching improves performance
* when writer instances are reused as it avoids a per-call serializer
* lookup.
- *
+ *
* @since 2.2
*/
public boolean hasPrefetchedSerializer() {
@@ -1025,7 +1025,7 @@ public boolean hasPrefetchedSerializer() {
public ContextAttributes getAttributes() {
return _config.getAttributes();
}
-
+
/*
/**********************************************************
/* Serialization methods; ones from ObjectCodec first
@@ -1133,7 +1133,7 @@ public void writeValue(DataOutput out, Object value)
*/
public String writeValueAsString(Object value)
throws JsonProcessingException
- {
+ {
// alas, we have to pull the recycler directly here...
SegmentedStringWriter sw = new SegmentedStringWriter(_generatorFactory._getBufferRecycler());
try {
@@ -1186,7 +1186,7 @@ public byte[] writeValueAsBytes(Object value)
* instance for specified type.
*
* @param type Type to generate schema for (possibly with generic signature)
- *
+ *
* @since 2.2
*/
public void acceptJsonFormatVisitor(JavaType type, JsonFormatVisitorWrapper visitor)
@@ -1216,7 +1216,7 @@ public boolean canSerialize(Class> type) {
/**
* Method for checking whether instances of given type can be serialized,
* and optionally why (as per {@link Throwable} returned).
- *
+ *
* @since 2.3
*/
public boolean canSerialize(Class> type, AtomicReference cause) {
@@ -1301,7 +1301,7 @@ private final void _writeCloseable(JsonGenerator gen, Object value)
/**
* Helper method called to set or override settings of passed-in
* {@link JsonGenerator}
- *
+ *
* @since 2.5
*/
protected final JsonGenerator _configureGenerator(JsonGenerator gen)
@@ -1318,7 +1318,7 @@ protected final void _assertNotNull(String paramName, Object src) {
throw new IllegalArgumentException(String.format("argument \"%s\" is null", paramName));
}
}
-
+
/*
/**********************************************************
/* Helper classes for configuration
@@ -1329,7 +1329,7 @@ protected final void _assertNotNull(String paramName, Object src) {
* Helper class used for containing settings specifically related
* to (re)configuring {@link JsonGenerator} constructed for
* writing output.
- *
+ *
* @since 2.5
*/
public final static class GeneratorSettings
@@ -1456,7 +1456,7 @@ public void initialize(JsonGenerator gen)
* As a minor optimization, we will make an effort to pre-fetch a serializer,
* or at least relevant TypeSerializer
, if given enough
* information.
- *
+ *
* @since 2.5
*/
public final static class Prefetch
@@ -1465,7 +1465,7 @@ public final static class Prefetch
private static final long serialVersionUID = 1L;
public final static Prefetch empty = new Prefetch(null, null, null);
-
+
/**
* Specified root serialization type to use; can be same
* as runtime type, but usually one of its super types
@@ -1486,7 +1486,7 @@ public final static class Prefetch
* serializer, but can pre-fetch {@link TypeSerializer}.
*/
private final TypeSerializer typeSerializer;
-
+
private Prefetch(JavaType rootT,
JsonSerializer ser, TypeSerializer typeSer)
{
diff --git a/src/main/java/com/fasterxml/jackson/databind/PropertyMetadata.java b/src/main/java/com/fasterxml/jackson/databind/PropertyMetadata.java
index 9b57186c2f..ede8109138 100644
--- a/src/main/java/com/fasterxml/jackson/databind/PropertyMetadata.java
+++ b/src/main/java/com/fasterxml/jackson/databind/PropertyMetadata.java
@@ -8,7 +8,7 @@
* properties. Carved out to reduce number of distinct properties that
* actual property implementations and place holders need to store;
* since instances are immutable, they can be freely shared.
- *
+ *
* @since 2.3
*/
public class PropertyMetadata
@@ -74,7 +74,7 @@ public static MergeInfo createForPropertyOverride(AnnotatedMember getter) {
/**
* Optional index of the property within containing Object.
- *
+ *
* @since 2.4
*/
protected final Integer _index;
@@ -94,7 +94,7 @@ public static MergeInfo createForPropertyOverride(AnnotatedMember getter) {
* NOTE: transient since it is assumed that this information is only
* relevant during initial setup and not needed after full initialization.
* May be changed if this proves necessary.
- *
+ *
* @since 2.9
*/
protected final transient MergeInfo _mergeInfo;
@@ -103,7 +103,7 @@ public static MergeInfo createForPropertyOverride(AnnotatedMember getter) {
* Settings regarding handling of incoming `null`s, both for value itself
* and, for structured types, content values (array/Collection elements,
* Map values).
- *
+ *
* @since 2.9
*/
protected Nulls _valueNulls, _contentNulls;
@@ -205,12 +205,12 @@ public PropertyMetadata withDefaultValue(String def) {
return new PropertyMetadata(_required, _description, _index, def,
_mergeInfo, _valueNulls, _contentNulls);
}
-
+
public PropertyMetadata withIndex(Integer index) {
return new PropertyMetadata(_required, _description, index, _defaultValue,
_mergeInfo, _valueNulls, _contentNulls);
}
-
+
public PropertyMetadata withRequired(Boolean b) {
if (b == null) {
if (_required == null) {
diff --git a/src/main/java/com/fasterxml/jackson/databind/PropertyName.java b/src/main/java/com/fasterxml/jackson/databind/PropertyName.java
index ac6e5ed718..6473caca30 100644
--- a/src/main/java/com/fasterxml/jackson/databind/PropertyName.java
+++ b/src/main/java/com/fasterxml/jackson/databind/PropertyName.java
@@ -9,7 +9,7 @@
/**
* Simple value class used for containing names of properties as defined
* by annotations (and possibly other configuration sources).
- *
+ *
* @since 2.1
*/
public class PropertyName
@@ -34,7 +34,7 @@ public class PropertyName
* commonly this value disables behavior for which name would be needed.
*/
public final static PropertyName NO_NAME = new PropertyName(new String(_NO_NAME), null);
-
+
/**
* Basic name of the property.
*/
@@ -52,11 +52,11 @@ public class PropertyName
* NOTE: not defined as volatile to avoid performance problem with
* concurrent access in multi-core environments; due to statelessness
* of {@link SerializedString} at most leads to multiple instantiations.
- *
+ *
* @since 2.4
*/
protected SerializableString _encodedSimple;
-
+
public PropertyName(String simpleName) {
this(simpleName, null);
}
@@ -132,7 +132,7 @@ public PropertyName withSimpleName(String simpleName)
}
return new PropertyName(simpleName, _namespace);
}
-
+
/**
* Fluent factory method for constructing an instance with different
* namespace.
@@ -147,13 +147,13 @@ public PropertyName withNamespace(String ns) {
}
return new PropertyName(_simpleName, ns);
}
-
+
/*
/**********************************************************
/* Accessors
/**********************************************************
*/
-
+
public String getSimpleName() {
return _simpleName;
}
@@ -161,7 +161,7 @@ public String getSimpleName() {
/**
* Accessor that may be used to get lazily-constructed efficient
* representation of the simple name.
- *
+ *
* @since 2.4
*/
public SerializableString simpleAsEncoded(MapperConfig> config) {
@@ -176,7 +176,7 @@ public SerializableString simpleAsEncoded(MapperConfig> config) {
}
return sstr;
}
-
+
public String getNamespace() {
return _namespace;
}
@@ -192,7 +192,7 @@ public boolean hasSimpleName(String str) {
// _simpleName never null so...
return _simpleName.equals(str);
}
-
+
public boolean hasNamespace() {
return _namespace != null;
}
@@ -202,7 +202,7 @@ public boolean hasNamespace() {
*
* !hasSimpleName() << !hasNamespace();
*
- *
+ *
* @since 2.4
*/
public boolean isEmpty() {
@@ -239,7 +239,7 @@ public boolean equals(Object o)
}
return _namespace.equals(other._namespace);
}
-
+
@Override
public int hashCode() {
if (_namespace == null) {
@@ -247,7 +247,7 @@ public int hashCode() {
}
return _namespace.hashCode() ^ _simpleName.hashCode();
}
-
+
@Override
public String toString() {
if (_namespace == null) {
diff --git a/src/main/java/com/fasterxml/jackson/databind/PropertyNamingStrategies.java b/src/main/java/com/fasterxml/jackson/databind/PropertyNamingStrategies.java
index dd523ef93e..5e8048dfe8 100644
--- a/src/main/java/com/fasterxml/jackson/databind/PropertyNamingStrategies.java
+++ b/src/main/java/com/fasterxml/jackson/databind/PropertyNamingStrategies.java
@@ -24,7 +24,7 @@ public abstract class PropertyNamingStrategies
/* Static instances that may be referenced
/**********************************************************************
*/
-
+
/**
* Naming convention used in Java, where words other than first are capitalized
* and no separator is used between words. Since this is the native Java naming convention,
@@ -137,13 +137,13 @@ protected String translateLowerCaseWithSeparator(final String input, final char
if (length == 0) {
return input;
}
-
+
final StringBuilder result = new StringBuilder(length + (length >> 1));
int upperCount = 0;
for (int i = 0; i < length; ++i) {
char ch = input.charAt(i);
char lc = Character.toLowerCase(ch);
-
+
if (lc == ch) { // lower-case letter means we can get new word
// but need to check for multi-letter upper-case (acronym), where assumption
// is that the last upper-case char is start of a new word
@@ -170,7 +170,7 @@ protected String translateLowerCaseWithSeparator(final String input, final char
/* Standard implementations
/**********************************************************************
*/
-
+
/**
* A {@link PropertyNamingStrategy} that translates typical camel case Java
* property names to lower case JSON element names, separated by
@@ -178,7 +178,7 @@ protected String translateLowerCaseWithSeparator(final String input, final char
* provides some additional translations beyond strictly translating from
* camel case only. In particular, the following translations are applied
* by this PropertyNamingStrategy.
- *
+ *
* Every upper case letter in the Java property name is translated
* into two characters, an underscore and the lower case equivalent of the
* target character, with three exceptions.
@@ -312,15 +312,15 @@ public String translate(String input) {
}
/**
- * A {@link PropertyNamingStrategy} that translates typical camelCase Java
+ * A {@link PropertyNamingStrategy} that translates typical camelCase Java
* property names to PascalCase JSON element names (i.e., with a capital
- * first letter). In particular, the following translations are applied by
+ * first letter). In particular, the following translations are applied by
* this PropertyNamingStrategy.
- *
- * The first lower-case letter in the Java property name is translated
+ *
+ * The first lower-case letter in the Java property name is translated
* into its equivalent upper-case representation.
- *
- * This rules result in the following example translation from
+ *
+ * This rules result in the following example translation from
* Java property names to JSON element names.
* "userName" is translated to "UserName"
*/
@@ -336,7 +336,7 @@ public static class UpperCamelCaseStrategy extends NamingBase
/**
* Converts camelCase to PascalCase
- *
+ *
* For example, "userName" would be converted to
* "UserName".
*
diff --git a/src/main/java/com/fasterxml/jackson/databind/PropertyNamingStrategy.java b/src/main/java/com/fasterxml/jackson/databind/PropertyNamingStrategy.java
index 7cc8eaf1eb..ae7f514315 100644
--- a/src/main/java/com/fasterxml/jackson/databind/PropertyNamingStrategy.java
+++ b/src/main/java/com/fasterxml/jackson/databind/PropertyNamingStrategy.java
@@ -32,7 +32,7 @@
* are deprecated due to
* databind#2715 .
* Please use constants and classes in {@link PropertyNamingStrategies} instead.
- *
+ *
*/
@SuppressWarnings("serial")
public class PropertyNamingStrategy // NOTE: was abstract until 2.7
@@ -104,13 +104,13 @@ public class PropertyNamingStrategy // NOTE: was abstract until 2.7
* Method called to find external name (name used in JSON) for given logical
* POJO property,
* as defined by given field.
- *
+ *
* @param config Configuration in used: either SerializationConfig
* or DeserializationConfig
, depending on whether method is called
* during serialization or deserialization
* @param field Field used to access property
* @param defaultName Default name that would be used for property in absence of custom strategy
- *
+ *
* @return Logical name to use for property that the field represents
*/
public String nameForField(MapperConfig> config, AnnotatedField field,
@@ -125,13 +125,13 @@ public String nameForField(MapperConfig> config, AnnotatedField field,
* as defined by given getter method; typically called when building a serializer.
* (but not always -- when using "getter-as-setter", may be called during
* deserialization)
- *
+ *
* @param config Configuration in used: either SerializationConfig
* or DeserializationConfig
, depending on whether method is called
* during serialization or deserialization
* @param method Method used to access property.
* @param defaultName Default name that would be used for property in absence of custom strategy
- *
+ *
* @return Logical name to use for property that the method represents
*/
public String nameForGetterMethod(MapperConfig> config, AnnotatedMethod method,
@@ -145,13 +145,13 @@ public String nameForGetterMethod(MapperConfig> config, AnnotatedMethod method
* POJO property,
* as defined by given setter method; typically called when building a deserializer
* (but not necessarily only then).
- *
+ *
* @param config Configuration in used: either SerializationConfig
* or DeserializationConfig
, depending on whether method is called
* during serialization or deserialization
* @param method Method used to access property.
* @param defaultName Default name that would be used for property in absence of custom strategy
- *
+ *
* @return Logical name to use for property that the method represents
*/
public String nameForSetterMethod(MapperConfig> config, AnnotatedMethod method,
@@ -165,7 +165,7 @@ public String nameForSetterMethod(MapperConfig> config, AnnotatedMethod method
* POJO property,
* as defined by given constructor parameter; typically called when building a deserializer
* (but not necessarily only then).
- *
+ *
* @param config Configuration in used: either SerializationConfig
* or DeserializationConfig
, depending on whether method is called
* during serialization or deserialization
@@ -216,7 +216,7 @@ public String nameForConstructorParameter(MapperConfig> config, AnnotatedParam
{
return translate(defaultName);
}
-
+
public abstract String translate(String propertyName);
/**
@@ -231,13 +231,13 @@ protected static String translateLowerCaseWithSeparator(final String input, fina
if (length == 0) {
return input;
}
-
+
final StringBuilder result = new StringBuilder(length + (length >> 1));
int upperCount = 0;
for (int i = 0; i < length; ++i) {
char ch = input.charAt(i);
char lc = Character.toLowerCase(ch);
-
+
if (lc == ch) { // lower-case letter means we can get new word
// but need to check for multi-letter upper-case (acronym), where assumption
// is that the last upper-case char is start of a new word
@@ -261,10 +261,10 @@ protected static String translateLowerCaseWithSeparator(final String input, fina
/*
/**********************************************************
- /* Standard implementations
+ /* Standard implementations
/**********************************************************
*/
-
+
/**
* @deprecated Since 2.12 use {@link PropertyNamingStrategies.SnakeCaseStrategy} instead
* (see
@@ -320,7 +320,7 @@ public static class UpperCamelCaseStrategy extends PropertyNamingStrategyBase
{
/**
* Converts camelCase to PascalCase
- *
+ *
* For example, "userName" would be converted to
* "UserName".
*
diff --git a/src/main/java/com/fasterxml/jackson/databind/SequenceWriter.java b/src/main/java/com/fasterxml/jackson/databind/SequenceWriter.java
index 509ddf5eda..c833a1737e 100644
--- a/src/main/java/com/fasterxml/jackson/databind/SequenceWriter.java
+++ b/src/main/java/com/fasterxml/jackson/databind/SequenceWriter.java
@@ -25,7 +25,7 @@
* Explicit {@link #close} is needed after all values have been written
* ({@link ObjectWriter} can auto-close after individual value writes)
*
- *
+ *
* @since 2.5
*/
public class SequenceWriter
@@ -43,7 +43,7 @@ public class SequenceWriter
protected final JsonSerializer _rootSerializer;
protected final TypeSerializer _typeSerializer;
-
+
protected final boolean _closeGenerator;
protected final boolean _cfgFlush;
protected final boolean _cfgCloseCloseable;
@@ -61,7 +61,7 @@ public class SequenceWriter
* Assumption is that
*/
protected PropertySerializerMap _dynamicSerializers;
-
+
/**
* State flag for keeping track of need to write matching END_ARRAY,
* if a START_ARRAY was written during initialization
@@ -138,7 +138,7 @@ public SequenceWriter write(Object value) throws IOException
_provider.serializeValue(_generator, null);
return this;
}
-
+
if (_cfgCloseCloseable && (value instanceof Closeable)) {
return _writeCloseableValue(value);
}
@@ -162,7 +162,7 @@ public SequenceWriter write(Object value) throws IOException
* to write; further, full type (often generic, like {@link java.util.Map}
* is passed in case a new
* {@link JsonSerializer} needs to be fetched to handle type
- *
+ *
* If root type was specified for {@link ObjectWriter},
* value must be of compatible type (same or subtype).
*/
@@ -172,7 +172,7 @@ public SequenceWriter write(Object value, JavaType type) throws IOException
_provider.serializeValue(_generator, null);
return this;
}
-
+
if (_cfgCloseCloseable && (value instanceof Closeable)) {
return _writeCloseableValue(value, type);
}
@@ -219,7 +219,7 @@ public SequenceWriter writeAll(Iterable> iterable) throws IOException
}
return this;
}
-
+
@Override
public void flush() throws IOException {
if (!_closed) {
diff --git a/src/main/java/com/fasterxml/jackson/databind/SerializationConfig.java b/src/main/java/com/fasterxml/jackson/databind/SerializationConfig.java
index 527606af38..1a88848ef3 100644
--- a/src/main/java/com/fasterxml/jackson/databind/SerializationConfig.java
+++ b/src/main/java/com/fasterxml/jackson/databind/SerializationConfig.java
@@ -62,7 +62,7 @@ public final class SerializationConfig
/*
/**********************************************************
- /* Serialization features
+ /* Serialization features
/**********************************************************
*/
@@ -190,7 +190,7 @@ private SerializationConfig(SerializationConfig src,
_formatWriteFeatures = formatFeatures;
_formatWriteFeaturesToChange = formatFeaturesMask;
}
-
+
private SerializationConfig(SerializationConfig src, BaseSettings base)
{
super(src, base);
@@ -343,7 +343,7 @@ public SerializationConfig with(SubtypeResolver str) {
public SerializationConfig withView(Class> view) {
return (_view == view) ? this : new SerializationConfig(this, view);
}
-
+
@Override
public SerializationConfig with(ContextAttributes attrs) {
return (attrs == _attributes) ? this : new SerializationConfig(this, attrs);
@@ -737,7 +737,7 @@ public PrettyPrinter constructDefaultPrettyPrinter() {
}
return pp;
}
-
+
/*
/**********************************************************
/* JsonParser initialization
@@ -748,7 +748,7 @@ public PrettyPrinter constructDefaultPrettyPrinter() {
* Method called by {@link ObjectMapper} and {@link ObjectWriter}
* to modify those {@link com.fasterxml.jackson.core.JsonGenerator.Feature} settings
* that have been configured via this config instance.
- *
+ *
* @since 2.5
*/
public void initialize(JsonGenerator g)
@@ -828,7 +828,7 @@ public final boolean isEnabled(SerializationFeature feature) {
* Accessor method that first checks if we have any overrides
* for feature, and only if not, checks state of passed-in
* factory.
- *
+ *
* @since 2.5
*/
public final boolean isEnabled(JsonGenerator.Feature f, JsonFactory factory) {
@@ -838,11 +838,11 @@ public final boolean isEnabled(JsonGenerator.Feature f, JsonFactory factory) {
}
return factory.isEnabled(f);
}
-
+
/**
* "Bulk" access method for checking that all features specified by
* mask are enabled.
- *
+ *
* @since 2.3
*/
public final boolean hasSerializationFeatures(int featureMask) {
diff --git a/src/main/java/com/fasterxml/jackson/databind/SerializationFeature.java b/src/main/java/com/fasterxml/jackson/databind/SerializationFeature.java
index 201efe1094..43eb12930b 100644
--- a/src/main/java/com/fasterxml/jackson/databind/SerializationFeature.java
+++ b/src/main/java/com/fasterxml/jackson/databind/SerializationFeature.java
@@ -226,10 +226,10 @@ public enum SerializationFeature implements ConfigFeature
* Feature is disabled by default, so that zone id is NOT included; rather, timezone
* offset is used for ISO-8601 compatibility (if any timezone information is
* included in value).
- *
+ *
* @since 2.6
*/
- WRITE_DATES_WITH_ZONE_ID(false),
+ WRITE_DATES_WITH_ZONE_ID(false),
/**
* Feature that determines whether timezone/offset included in zoned date/time
@@ -264,7 +264,7 @@ public enum SerializationFeature implements ConfigFeature
*
* Feature is enabled by default, so that period/duration are by default
* serialized as timestamps.
- *
+ *
* @since 2.5
*/
WRITE_DURATIONS_AS_TIMESTAMPS(true),
@@ -318,7 +318,7 @@ public enum SerializationFeature implements ConfigFeature
* {@link Enum}s as regular values.
*
* Feature is disabled by default.
- *
+ *
* @since 2.10
*/
WRITE_ENUM_KEYS_USING_INDEX(false),
@@ -396,7 +396,7 @@ public enum SerializationFeature implements ConfigFeature
* support it.
*
* Feature is disabled by default.
- *
+ *
* @deprecated Since 2.5: use {@link com.fasterxml.jackson.core.JsonGenerator.Feature#WRITE_BIGDECIMAL_AS_PLAIN} instead
* (using {@link ObjectWriter#with(com.fasterxml.jackson.core.JsonGenerator.Feature)}).
*/
@@ -476,7 +476,7 @@ public enum SerializationFeature implements ConfigFeature
private final boolean _defaultState;
private final int _mask;
-
+
private SerializationFeature(boolean defaultState) {
_defaultState = defaultState;
_mask = (1 << ordinal());
diff --git a/src/main/java/com/fasterxml/jackson/databind/SerializerProvider.java b/src/main/java/com/fasterxml/jackson/databind/SerializerProvider.java
index b6328a50a0..c48639927f 100644
--- a/src/main/java/com/fasterxml/jackson/databind/SerializerProvider.java
+++ b/src/main/java/com/fasterxml/jackson/databind/SerializerProvider.java
@@ -77,7 +77,7 @@ public abstract class SerializerProvider
/* Configuration, general
/**********************************************************
*/
-
+
/**
* Serialization configuration to use for serialization processing.
*/
@@ -88,7 +88,7 @@ public abstract class SerializerProvider
* Only set for non-blueprint instances.
*/
protected final Class> _serializationView;
-
+
/*
/**********************************************************
/* Configuration, factories
@@ -106,7 +106,7 @@ public abstract class SerializerProvider
/* Helper objects for caching, reuse
/**********************************************************
*/
-
+
/**
* Cache for doing type-to-value-serializer lookups.
*/
@@ -115,11 +115,11 @@ public abstract class SerializerProvider
/**
* Lazily-constructed holder for per-call attributes.
* Only set for non-blueprint instances.
- *
+ *
* @since 2.3
*/
protected transient ContextAttributes _attributes;
-
+
/*
/**********************************************************
/* Configuration, specialized serializers
@@ -177,11 +177,11 @@ public abstract class SerializerProvider
/**
* Flag set to indicate that we are using vanilla null value serialization
- *
+ *
* @since 2.3
*/
protected final boolean _stdNullValueSerializer;
-
+
/*
/**********************************************************
/* Life-cycle
@@ -239,7 +239,7 @@ protected SerializerProvider(SerializerProvider src,
/**
* Copy-constructor used when making a copy of a blueprint instance.
- *
+ *
* @since 2.5
*/
protected SerializerProvider(SerializerProvider src)
@@ -260,7 +260,7 @@ protected SerializerProvider(SerializerProvider src)
_stdNullValueSerializer = src._stdNullValueSerializer;
}
-
+
/*
/**********************************************************
/* Methods for configuring default settings
@@ -313,7 +313,7 @@ public void setNullKeySerializer(JsonSerializer nks)
}
_nullKeySerializer = nks;
}
-
+
/*
/**********************************************************
/* DatabindContext implementation (and closely related but ser-specific)
@@ -444,13 +444,13 @@ public final boolean isEnabled(SerializationFeature feature) {
/**
* "Bulk" access method for checking that all features specified by
* mask are enabled.
- *
+ *
* @since 2.3
*/
public final boolean hasSerializationFeatures(int featureMask) {
return _config.hasSerializationFeatures(featureMask);
}
-
+
/**
* Convenience method for accessing provider to find serialization filters used,
* equivalent to calling:
@@ -515,7 +515,7 @@ public final TokenBuffer bufferForValueConversion() {
*/
public abstract WritableObjectId findObjectId(Object forPojo,
ObjectIdGenerator> generatorType);
-
+
/*
/**********************************************************
/* General serializer locating functionality
@@ -577,7 +577,7 @@ public JsonSerializer findValueSerializer(Class> valueType, BeanProper
* to handle polymorphic types.
*
* Note: this call will also contextualize serializer before returning it.
- *
+ *
* @param property When creating secondary serializers, property for which
* serializer is needed: annotations of the property (or bean that contains it)
* may be checked to create contextual serializers.
@@ -611,7 +611,7 @@ public JsonSerializer findValueSerializer(JavaType valueType, BeanProper
* Method variant used when we do NOT want contextualization to happen; it will need
* to be handled at a later point, but caller wants to be able to do that
* as needed; sometimes to avoid infinite loops
- *
+ *
* @since 2.5
*/
public JsonSerializer findValueSerializer(Class> valueType) throws JsonMappingException
@@ -640,7 +640,7 @@ public JsonSerializer findValueSerializer(Class> valueType) throws Jso
* Method variant used when we do NOT want contextualization to happen; it will need
* to be handled at a later point, but caller wants to be able to do that
* as needed; sometimes to avoid infinite loops
- *
+ *
* @since 2.5
*/
public JsonSerializer findValueSerializer(JavaType valueType)
@@ -662,18 +662,18 @@ public JsonSerializer findValueSerializer(JavaType valueType)
}
return ser;
}
-
+
/**
* Similar to {@link #findValueSerializer(JavaType, BeanProperty)}, but used
* when finding "primary" property value serializer (one directly handling
* value of the property). Difference has to do with contextual resolution,
* and method(s) called: this method should only be called when caller is
* certain that this is the primary property value serializer.
- *
+ *
* @param valueType Type of values to serialize
* @param property Property that is being handled; will never be null, and its
* type has to match valueType
parameter.
- *
+ *
* @since 2.3
*/
@SuppressWarnings("unchecked")
@@ -806,7 +806,7 @@ public JsonSerializer findContentValueSerializer(Class> valueType,
* sequence. This method is currently only used for root-level serializer
* handling to allow for simpler caching. A call can always be replaced
* by equivalent calls to access serializer and type serializer separately.
- *
+ *
* @param valueType Type for purpose of locating a serializer; usually dynamic
* runtime type, but can also be static declared type, depending on configuration
* @param cache Whether resulting value serializer should be cached or not; this is just
@@ -850,12 +850,12 @@ public JsonSerializer findTypedValueSerializer(Class> valueType,
* sequence. This method is currently only used for root-level serializer
* handling to allow for simpler caching. A call can always be replaced
* by equivalent calls to access serializer and type serializer separately.
- *
+ *
* @param valueType Declared type of value being serialized (which may not
* be actual runtime type); used for finding both value serializer and
* type serializer to use for adding polymorphic type (if any)
* @param cache Whether resulting value serializer should be cached or not; this is just
- * a hint
+ * a hint
* @param property When creating secondary serializers, property for which
* serializer is needed: annotations of the property (or bean that contains it)
* may be checked to create contextual serializers.
@@ -945,7 +945,7 @@ public JsonSerializer getDefaultNullKeySerializer() {
public JsonSerializer getDefaultNullValueSerializer() {
return _nullValueSerializer;
}
-
+
/**
* Method called to get the serializer to use for serializing
* Map keys that are nulls: this is needed since JSON does not allow
@@ -960,7 +960,7 @@ public JsonSerializer getDefaultNullValueSerializer() {
* declared type. Note that type is completely based on declared type,
* since nulls in Java have no type and thus runtime type cannot be
* determined.
- *
+ *
* @since 2.0
*/
public JsonSerializer findNullKeySerializer(JavaType serializationType,
@@ -978,7 +978,7 @@ public JsonSerializer findNullKeySerializer(JavaType serializationType,
* can be overridden to add custom null serialization for properties
* of certain type or name. This gives method full granularity to basically
* override null handling for any specific property or class of properties.
- *
+ *
* @since 2.0
*/
public JsonSerializer findNullValueSerializer(BeanProperty property)
@@ -1011,7 +1011,7 @@ public JsonSerializer getUnknownTypeSerializer(Class> unknownType) {
* Helper method called to see if given serializer is considered to be
* something returned by {@link #getUnknownTypeSerializer}, that is, something
* for which no regular serializer was found or constructed.
- *
+ *
* @since 2.5
*/
public boolean isUnknownTypeSerializer(JsonSerializer> ser) {
@@ -1027,7 +1027,7 @@ public boolean isUnknownTypeSerializer(JsonSerializer> ser) {
}
return false;
}
-
+
/*
/**********************************************************
/* Methods for creating instances based on annotations
@@ -1041,7 +1041,7 @@ public boolean isUnknownTypeSerializer(JsonSerializer> ser) {
* Either way, serialize will be properly resolved
* (via {@link com.fasterxml.jackson.databind.ser.ResolvableSerializer}) and/or contextualized
* (via {@link com.fasterxml.jackson.databind.ser.ContextualSerializer}) as necessary.
- *
+ *
* @param annotated Annotated entity that contained definition
* @param serDef Serializer definition: either an instance or class
*/
@@ -1083,9 +1083,9 @@ public abstract boolean includeFilterSuppressNulls(Object filter)
* directly created to serialize values of a POJO property),
* to handle details of resolving
* {@link ContextualSerializer} with given property context.
- *
+ *
* @param property Property for which the given primary serializer is used; never null.
- *
+ *
* @since 2.3
*/
public JsonSerializer> handlePrimaryContextualization(JsonSerializer> ser,
@@ -1110,10 +1110,10 @@ public JsonSerializer> handlePrimaryContextualization(JsonSerializer> ser,
* Given that these serializers are not directly related to given property
* (or, in case of root value property, to any property), annotations
* accessible may or may not be relevant.
- *
+ *
* @param property Property for which serializer is used, if any; null
* when deserializing root values
- *
+ *
* @since 2.3
*/
public JsonSerializer> handleSecondaryContextualization(JsonSerializer> ser,
@@ -1127,7 +1127,7 @@ public JsonSerializer> handleSecondaryContextualization(JsonSerializer> ser,
}
return ser;
}
-
+
/*
/********************************************************
/* Convenience methods for serializing using default methods
@@ -1154,7 +1154,7 @@ public final void defaultSerializeValue(Object value, JsonGenerator gen) throws
findTypedValueSerializer(cls, true, null).serialize(value, gen, this);
}
}
-
+
/**
* Convenience method that will serialize given field with specified
* value. Value may be null. Serializer is done using the usual
@@ -1374,7 +1374,7 @@ public JsonMappingException mappingException(String message, Object... msgArgs)
* Factory method for constructing a {@link JsonMappingException};
* usually only indirectly used by calling
* {@link #reportMappingProblem(Throwable, String, Object...)}
- *
+ *
* @since 2.8
*
* @deprecated Since 2.9
@@ -1414,7 +1414,7 @@ protected void _reportIncompatibleRootType(Object value, JavaType rootType) thro
*/
protected JsonSerializer _findExplicitUntypedSerializer(Class> runtimeType)
throws JsonMappingException
- {
+ {
// Fast lookup from local lookup thingy works?
JsonSerializer ser = _knownSerializers.untypedValueSerializer(runtimeType);
if (ser == null) {
@@ -1469,7 +1469,7 @@ protected JsonSerializer _createAndCacheUntypedSerializer(Class> rawTy
protected JsonSerializer _createAndCacheUntypedSerializer(JavaType type)
throws JsonMappingException
- {
+ {
JsonSerializer ser;
try {
ser = _createUntypedSerializer(type);
@@ -1479,7 +1479,7 @@ protected JsonSerializer _createAndCacheUntypedSerializer(JavaType type)
ser = null;
reportMappingProblem(iae, ClassUtil.exceptionMessage(iae));
}
-
+
if (ser != null) {
// 21-Dec-2015, tatu: Should we also cache using raw key?
_serializerCache.addAndResolveNonTypedSerializer(type, ser, this);
diff --git a/src/main/java/com/fasterxml/jackson/databind/annotation/JsonAppend.java b/src/main/java/com/fasterxml/jackson/databind/annotation/JsonAppend.java
index 445f605b6c..122f6a7d08 100644
--- a/src/main/java/com/fasterxml/jackson/databind/annotation/JsonAppend.java
+++ b/src/main/java/com/fasterxml/jackson/databind/annotation/JsonAppend.java
@@ -13,7 +13,7 @@
* after regular properties (although ordering may be changed using
* both standard @JsonPropertyOrder
annotation, and
* properties of this annotation).
- *
+ *
* @since 2.5
*/
@Target({ElementType.ANNOTATION_TYPE, ElementType.TYPE })
@@ -81,7 +81,7 @@
*/
public boolean required() default false;
}
-
+
/**
* Definition of a single general virtual property.
*/
diff --git a/src/main/java/com/fasterxml/jackson/databind/annotation/JsonDeserialize.java b/src/main/java/com/fasterxml/jackson/databind/annotation/JsonDeserialize.java
index 7726254503..f9f243564a 100644
--- a/src/main/java/com/fasterxml/jackson/databind/annotation/JsonDeserialize.java
+++ b/src/main/java/com/fasterxml/jackson/databind/annotation/JsonDeserialize.java
@@ -89,7 +89,7 @@ public Class extends KeyDeserializer> keyUsing()
public Class> builder() default Void.class;
// // // Annotations for specifying intermediate Converters (2.2+)
-
+
/**
* Which helper object (if any) is to be used to convert from Jackson-bound
* intermediate type (source type of converter) into actual property type
@@ -111,8 +111,8 @@ public Class extends KeyDeserializer> keyUsing()
*/
@SuppressWarnings("rawtypes") // to work around JDK8 bug wrt Class-valued annotation properties
public Class extends Converter> contentConverter() default Converter.None.class;
-
-
+
+
// // // Annotations for explicitly specifying deserialization type
// // // (which is used for choosing deserializer, if not explicitly
// // // specified
diff --git a/src/main/java/com/fasterxml/jackson/databind/annotation/JsonNaming.java b/src/main/java/com/fasterxml/jackson/databind/annotation/JsonNaming.java
index 507cd3401b..e190721567 100644
--- a/src/main/java/com/fasterxml/jackson/databind/annotation/JsonNaming.java
+++ b/src/main/java/com/fasterxml/jackson/databind/annotation/JsonNaming.java
@@ -10,7 +10,7 @@
* Note that if the {@link #value} property is omitted, its default value
* means "use default naming" (that is, no alternate naming method is used).
* This can be used as an override with mix-ins.
- *
+ *
* @since 2.1
*/
@Target({ElementType.ANNOTATION_TYPE, ElementType.TYPE})
diff --git a/src/main/java/com/fasterxml/jackson/databind/annotation/JsonSerialize.java b/src/main/java/com/fasterxml/jackson/databind/annotation/JsonSerialize.java
index 625c7122bf..93cad5ba84 100644
--- a/src/main/java/com/fasterxml/jackson/databind/annotation/JsonSerialize.java
+++ b/src/main/java/com/fasterxml/jackson/databind/annotation/JsonSerialize.java
@@ -73,7 +73,7 @@ public Class extends JsonSerializer> keyUsing()
* default null serializer.
* Note that using this property when annotation types (classes) has
* no effect currently (it is possible this could be improved in future).
- *
+ *
* @since 2.3
*/
@SuppressWarnings("rawtypes") // to work around JDK8 bug wrt Class-valued annotation properties
@@ -116,7 +116,7 @@ public Class extends JsonSerializer> nullsUsing()
* thrown by serializer.
*/
public Class> contentAs() default Void.class;
-
+
/**
* Whether type detection used is dynamic or static: that is,
* whether actual runtime type is used (dynamic), or just the
@@ -130,7 +130,7 @@ public Class extends JsonSerializer> nullsUsing()
public Typing typing() default Typing.DEFAULT_TYPING;
// // // Annotations for specifying intermediate Converters (2.2+)
-
+
/**
* Which helper object is to be used to convert type into something
* that Jackson knows how to serialize; either because base type
@@ -153,7 +153,7 @@ public Class extends JsonSerializer> nullsUsing()
*/
@SuppressWarnings("rawtypes") // to work around JDK8 bug wrt Class-valued annotation properties
public Class extends Converter> contentConverter() default Converter.None.class;
-
+
// // // Annotation(s) for inclusion criteria
/**
@@ -177,7 +177,7 @@ public Class extends JsonSerializer> nullsUsing()
*/
@Deprecated
public Inclusion include() default Inclusion.DEFAULT_INCLUSION;
-
+
/*
/**********************************************************
/* Value enumerations needed
@@ -236,7 +236,7 @@ public enum Inclusion
/**
* Pseudo-value that is used to indicate
* "use whatever is default used at higher level".
- *
+ *
* @since 2.3
*/
DEFAULT_INCLUSION
@@ -261,11 +261,11 @@ public enum Typing
* be used.
*/
STATIC,
-
+
/**
* Pseudo-value that is used to indicate
* "use whatever is default used at higher level".
- *
+ *
* @since 2.3
*/
DEFAULT_TYPING
diff --git a/src/main/java/com/fasterxml/jackson/databind/cfg/BaseSettings.java b/src/main/java/com/fasterxml/jackson/databind/cfg/BaseSettings.java
index a1f0844487..6a2b0d6b3d 100644
--- a/src/main/java/com/fasterxml/jackson/databind/cfg/BaseSettings.java
+++ b/src/main/java/com/fasterxml/jackson/databind/cfg/BaseSettings.java
@@ -30,13 +30,13 @@ public final class BaseSettings
/**
* We will use a default TimeZone as the baseline.
*/
- private static final TimeZone DEFAULT_TIMEZONE =
+ private static final TimeZone DEFAULT_TIMEZONE =
// TimeZone.getDefault()
/* [databind#915] 05-Nov-2015, tatu: Changed to UTC, from earlier
* baseline of GMT (up to 2.6)
*/
TimeZone.getTimeZone("UTC");
-
+
/*
/**********************************************************
/* Configuration settings; introspection, related
@@ -99,7 +99,7 @@ public final class BaseSettings
/* Configuration settings; other
/**********************************************************
*/
-
+
/**
* Custom date format to use for deserialization. If specified, will be
* used instead of {@link com.fasterxml.jackson.databind.util.StdDateFormat}.
@@ -138,11 +138,11 @@ public final class BaseSettings
* Explicitly default {@link Base64Variant} to use for handling
* binary data (byte[]
), used with data formats
* that use base64 encoding (like JSON, CSV).
- *
+ *
* @since 2.1
*/
protected final Base64Variant _defaultBase64;
-
+
/*
/**********************************************************
/* Construction
@@ -209,7 +209,7 @@ public BaseSettings copy() {
/* Factory methods
/**********************************************************
*/
-
+
public BaseSettings withClassIntrospector(ClassIntrospector ci) {
if (_classIntrospector == ci) {
return this;
@@ -218,7 +218,7 @@ public BaseSettings withClassIntrospector(ClassIntrospector ci) {
_typeResolverBuilder, _dateFormat, _handlerInstantiator, _locale,
_timeZone, _defaultBase64, _typeValidator, _accessorNaming);
}
-
+
public BaseSettings withAnnotationIntrospector(AnnotationIntrospector ai) {
if (_annotationIntrospector == ai) {
return this;
@@ -245,7 +245,7 @@ public BaseSettings withVisibility(PropertyAccessor forMethod, JsonAutoDetect.Vi
_timeZone, _defaultBase64, _typeValidator);
}
*/
-
+
public BaseSettings withPropertyNamingStrategy(PropertyNamingStrategy pns) {
if (_propertyNamingStrategy == pns) {
return this;
@@ -282,7 +282,7 @@ public BaseSettings withTypeResolverBuilder(TypeResolverBuilder> typer) {
typer, _dateFormat, _handlerInstantiator, _locale,
_timeZone, _defaultBase64, _typeValidator, _accessorNaming);
}
-
+
public BaseSettings withDateFormat(DateFormat df) {
if (_dateFormat == df) {
return this;
@@ -363,7 +363,7 @@ public BaseSettings with(PolymorphicTypeValidator v) {
_typeResolverBuilder, _dateFormat, _handlerInstantiator, _locale,
_timeZone, _defaultBase64, v, _accessorNaming);
}
-
+
/*
/**********************************************************
/* API
@@ -373,7 +373,7 @@ public BaseSettings with(PolymorphicTypeValidator v) {
public ClassIntrospector getClassIntrospector() {
return _classIntrospector;
}
-
+
public AnnotationIntrospector getAnnotationIntrospector() {
return _annotationIntrospector;
}
@@ -400,7 +400,7 @@ public TypeResolverBuilder> getTypeResolverBuilder() {
public PolymorphicTypeValidator getPolymorphicTypeValidator() {
return _typeValidator;
}
-
+
public DateFormat getDateFormat() {
return _dateFormat;
}
@@ -428,7 +428,7 @@ public TimeZone getTimeZone() {
public boolean hasExplicitTimeZone() {
return (_timeZone != null);
}
-
+
public Base64Variant getBase64Variant() {
return _defaultBase64;
}
diff --git a/src/main/java/com/fasterxml/jackson/databind/cfg/CoercionConfigs.java b/src/main/java/com/fasterxml/jackson/databind/cfg/CoercionConfigs.java
index 308ab76913..c6badfb6d0 100644
--- a/src/main/java/com/fasterxml/jackson/databind/cfg/CoercionConfigs.java
+++ b/src/main/java/com/fasterxml/jackson/databind/cfg/CoercionConfigs.java
@@ -28,7 +28,7 @@ public class CoercionConfigs
* by logical or physical type.
*/
protected final MutableCoercionConfig _defaultCoercions;
-
+
/**
* Coercion definitions by logical type ({@link LogicalType})
*/
diff --git a/src/main/java/com/fasterxml/jackson/databind/cfg/CoercionInputShape.java b/src/main/java/com/fasterxml/jackson/databind/cfg/CoercionInputShape.java
index 1bd2c2588b..8f17ce1c29 100644
--- a/src/main/java/com/fasterxml/jackson/databind/cfg/CoercionInputShape.java
+++ b/src/main/java/com/fasterxml/jackson/databind/cfg/CoercionInputShape.java
@@ -84,7 +84,7 @@ public enum CoercionInputShape
* usually used to allow special coercion into "empty" or {@code null} target type.
*/
EmptyObject,
-
+
/**
* Special case for String values with no content (or, if allowed by format or specific
* configuration, also "blank" String, that is, all-whitespace content).
diff --git a/src/main/java/com/fasterxml/jackson/databind/cfg/ConfigFeature.java b/src/main/java/com/fasterxml/jackson/databind/cfg/ConfigFeature.java
index 91edecad84..ff218f7922 100644
--- a/src/main/java/com/fasterxml/jackson/databind/cfg/ConfigFeature.java
+++ b/src/main/java/com/fasterxml/jackson/databind/cfg/ConfigFeature.java
@@ -12,7 +12,7 @@ public interface ConfigFeature
* Accessor for checking whether this feature is enabled by default.
*/
public boolean enabledByDefault();
-
+
/**
* Returns bit mask for this feature instance
*/
@@ -20,7 +20,7 @@ public interface ConfigFeature
/**
* Convenience method for checking whether feature is enabled in given bitmask
- *
+ *
* @since 2.6
*/
public boolean enabledIn(int flags);
diff --git a/src/main/java/com/fasterxml/jackson/databind/cfg/ConfigOverride.java b/src/main/java/com/fasterxml/jackson/databind/cfg/ConfigOverride.java
index 7557d9e04f..f0bc76c665 100644
--- a/src/main/java/com/fasterxml/jackson/databind/cfg/ConfigOverride.java
+++ b/src/main/java/com/fasterxml/jackson/databind/cfg/ConfigOverride.java
@@ -72,7 +72,7 @@ public abstract class ConfigOverride
* or not.
*/
protected Boolean _mergeable;
-
+
protected ConfigOverride() { }
protected ConfigOverride(ConfigOverride src) {
_format = src._format;
@@ -107,7 +107,7 @@ public static ConfigOverride empty() {
public Boolean getIsIgnoredType() {
return _isIgnoredType;
}
-
+
/**
* @since 2.9
*/
@@ -122,7 +122,7 @@ public Boolean getIsIgnoredType() {
* @since 2.9
*/
public Boolean getMergeable() { return _mergeable; }
-
+
/**
* Implementation used solely for "empty" instance; has no mutators
* and is not changed by core functionality.
diff --git a/src/main/java/com/fasterxml/jackson/databind/cfg/ConfigOverrides.java b/src/main/java/com/fasterxml/jackson/databind/cfg/ConfigOverrides.java
index 1240474706..103ca1c2da 100644
--- a/src/main/java/com/fasterxml/jackson/databind/cfg/ConfigOverrides.java
+++ b/src/main/java/com/fasterxml/jackson/databind/cfg/ConfigOverrides.java
@@ -9,7 +9,7 @@
/**
* Container for individual {@link ConfigOverride} values.
- *
+ *
* @since 2.8
*/
public class ConfigOverrides
@@ -94,7 +94,7 @@ protected ConfigOverrides(Map, MutableConfigOverride> overrides,
VisibilityChecker> defVisibility, Boolean defMergeable) {
this(overrides, defIncl, defSetter, defVisibility, defMergeable, null);
}
-
+
public ConfigOverrides copy()
{
Map, MutableConfigOverride> newOverrides;
@@ -188,7 +188,7 @@ public Boolean getDefaultMergeable() {
public Boolean getDefaultLeniency() {
return _defaultLeniency;
}
-
+
/**
* @since 2.9
*/
diff --git a/src/main/java/com/fasterxml/jackson/databind/cfg/ConstructorDetector.java b/src/main/java/com/fasterxml/jackson/databind/cfg/ConstructorDetector.java
index df0f493376..b7f8516d6d 100644
--- a/src/main/java/com/fasterxml/jackson/databind/cfg/ConstructorDetector.java
+++ b/src/main/java/com/fasterxml/jackson/databind/cfg/ConstructorDetector.java
@@ -191,7 +191,7 @@ public boolean singleArgCreatorDefaultsToProperties() {
* and, if so, whether JDK type constructors are allowed (if type is JDK type)
* to determine whether implicit constructor
* detection should be enabled for given type or not.
- *
+ *
* @param rawType Value type to consider
*
* @return True if implicit constructor detection should be enabled; false if not
diff --git a/src/main/java/com/fasterxml/jackson/databind/cfg/ContextAttributes.java b/src/main/java/com/fasterxml/jackson/databind/cfg/ContextAttributes.java
index 521cf8bcd3..b4715fae55 100644
--- a/src/main/java/com/fasterxml/jackson/databind/cfg/ContextAttributes.java
+++ b/src/main/java/com/fasterxml/jackson/databind/cfg/ContextAttributes.java
@@ -15,7 +15,7 @@
* sharing, by creating new copies instead of modifying state.
* This allows sharing of default values without per-call copying, but
* requires two-level lookup on access.
- *
+ *
* @since 2.3
*/
public abstract class ContextAttributes
@@ -23,7 +23,7 @@ public abstract class ContextAttributes
public static ContextAttributes getEmpty() {
return Impl.getEmpty();
}
-
+
/*
/**********************************************************
/* Per-reader/writer access
@@ -33,9 +33,9 @@ public static ContextAttributes getEmpty() {
public abstract ContextAttributes withSharedAttribute(Object key, Object value);
public abstract ContextAttributes withSharedAttributes(Map,?> attributes);
-
+
public abstract ContextAttributes withoutSharedAttribute(Object key);
-
+
/*
/**********************************************************
/* Per-operation (serialize/deserialize) access
@@ -67,7 +67,7 @@ public static class Impl extends ContextAttributes
protected final static Impl EMPTY = new Impl(Collections.emptyMap());
protected final static Object NULL_SURROGATE = new Object();
-
+
/**
* Shared attributes that we cannot modify in-place.
*/
@@ -82,13 +82,13 @@ public static class Impl extends ContextAttributes
* complicate that access.
*/
protected transient Map _nonShared;
-
+
/*
/**********************************************************
/* Construction, factory methods
/**********************************************************
*/
-
+
protected Impl(Map,?> shared) {
_shared = shared;
_nonShared = null;
@@ -98,7 +98,7 @@ protected Impl(Map,?> shared, Map nonShared) {
_shared = shared;
_nonShared = nonShared;
}
-
+
public static ContextAttributes getEmpty() {
return EMPTY;
}
@@ -108,7 +108,7 @@ public static ContextAttributes getEmpty() {
/* Per-reader/writer mutant factories
/**********************************************************
*/
-
+
@Override
public ContextAttributes withSharedAttribute(Object key, Object value)
{
@@ -153,7 +153,7 @@ public ContextAttributes withoutSharedAttribute(Object key)
/* Per-call access
/**********************************************************
*/
-
+
@Override
public Object getAttribute(Object key)
{
@@ -168,7 +168,7 @@ public Object getAttribute(Object key)
}
return _shared.get(key);
}
-
+
@Override
public ContextAttributes withPerCallAttribute(Object key, Object value)
{
@@ -212,7 +212,7 @@ protected ContextAttributes nonSharedInstance(Object key, Object value)
m.put(key, value);
return new Impl(_shared, m);
}
-
+
private Map _copy(Map,?> src)
{
return new HashMap(src);
diff --git a/src/main/java/com/fasterxml/jackson/databind/cfg/DatatypeFeatures.java b/src/main/java/com/fasterxml/jackson/databind/cfg/DatatypeFeatures.java
index 52a78a883a..8ed240dd1c 100644
--- a/src/main/java/com/fasterxml/jackson/databind/cfg/DatatypeFeatures.java
+++ b/src/main/java/com/fasterxml/jackson/databind/cfg/DatatypeFeatures.java
@@ -48,7 +48,7 @@ private DatatypeFeatures _with(int enabledFor1, int explicitFor1,
/* Public Mutant Factory methods
/**********************************************************************
*/
-
+
/**
* Mutant factory method that returns an instance with given Feature
* explicitly enabled.
@@ -99,7 +99,7 @@ public DatatypeFeatures withFeatures(DatatypeFeature... features) {
return this;
}
}
-
+
/**
* Mutant factory method that returns an instance with given Feature
* explicitly disabled.
@@ -164,7 +164,7 @@ private final static int _calcMask(DatatypeFeature... features) {
/* Public accessors
/**********************************************************************
*/
-
+
/**
* Accessor for getting value of specified feature in this set, regardless of
* whether explicit defined or not (if not explicitly enabled/disabled returns
@@ -255,7 +255,7 @@ public boolean isExplicitlyDisabled(DatatypeFeature f) {
return false;
}
}
-
+
/**
* Accessor for getting explicit state of given feature in this set
* iff explicitly set, or {@code null} if not explicitly set (default value)
diff --git a/src/main/java/com/fasterxml/jackson/databind/cfg/DeserializerFactoryConfig.java b/src/main/java/com/fasterxml/jackson/databind/cfg/DeserializerFactoryConfig.java
index 20b048f3aa..dc78404b6e 100644
--- a/src/main/java/com/fasterxml/jackson/databind/cfg/DeserializerFactoryConfig.java
+++ b/src/main/java/com/fasterxml/jackson/databind/cfg/DeserializerFactoryConfig.java
@@ -22,13 +22,13 @@ public class DeserializerFactoryConfig
/**
* By default we plug default key deserializers using as "just another" set of
* of key deserializers.
- *
+ *
* @since 2.2
*/
protected final static KeyDeserializers[] DEFAULT_KEY_DESERIALIZERS = new KeyDeserializers[] {
new StdKeyDeserializers()
};
-
+
/**
* List of providers for additional deserializers, checked before considering default
* basic or bean deserializers.
@@ -40,7 +40,7 @@ public class DeserializerFactoryConfig
* standard key deserializers.
*/
protected final KeyDeserializers[] _additionalKeyDeserializers;
-
+
/**
* List of modifiers that can change the way {@link BeanDeserializer} instances
* are configured and constructed.
@@ -161,11 +161,11 @@ public DeserializerFactoryConfig withAbstractTypeResolver(AbstractTypeResolver r
* value instantiator provider object.
* Added instantiator provider has the highest priority (that is, it
* gets called before any already registered resolver).
- *
+ *
* @param instantiators Object that can provide {@link com.fasterxml.jackson.databind.deser.ValueInstantiator}s for
* constructing POJO values during deserialization
*/
- public DeserializerFactoryConfig withValueInstantiators(ValueInstantiators instantiators)
+ public DeserializerFactoryConfig withValueInstantiators(ValueInstantiators instantiators)
{
if (instantiators == null) {
throw new IllegalArgumentException("Cannot pass null resolver");
@@ -174,17 +174,17 @@ public DeserializerFactoryConfig withValueInstantiators(ValueInstantiators insta
return new DeserializerFactoryConfig(_additionalDeserializers, _additionalKeyDeserializers, _modifiers,
_abstractTypeResolvers, all);
}
-
+
public boolean hasDeserializers() { return _additionalDeserializers.length > 0; }
public boolean hasKeyDeserializers() { return _additionalKeyDeserializers.length > 0; }
-
+
public boolean hasDeserializerModifiers() { return _modifiers.length > 0; }
public boolean hasAbstractTypeResolvers() { return _abstractTypeResolvers.length > 0; }
public boolean hasValueInstantiators() { return _valueInstantiators.length > 0; }
-
+
public Iterable deserializers() {
return new ArrayIterator(_additionalDeserializers);
}
@@ -192,7 +192,7 @@ public Iterable deserializers() {
public Iterable keyDeserializers() {
return new ArrayIterator(_additionalKeyDeserializers);
}
-
+
public Iterable deserializerModifiers() {
return new ArrayIterator(_modifiers);
}
diff --git a/src/main/java/com/fasterxml/jackson/databind/cfg/HandlerInstantiator.java b/src/main/java/com/fasterxml/jackson/databind/cfg/HandlerInstantiator.java
index 757a379e0f..05df86209a 100644
--- a/src/main/java/com/fasterxml/jackson/databind/cfg/HandlerInstantiator.java
+++ b/src/main/java/com/fasterxml/jackson/databind/cfg/HandlerInstantiator.java
@@ -37,13 +37,13 @@ public abstract class HandlerInstantiator
/**
* Method called to get an instance of deserializer of specified type.
- *
+ *
* @param config Deserialization configuration in effect
* @param annotated Element (Class, Method, Field, constructor parameter) that
* had annotation defining class of deserializer to construct (to allow
* implementation use information from other annotations)
* @param deserClass Class of deserializer instance to return
- *
+ *
* @return Deserializer instance to use
*/
public abstract JsonDeserializer> deserializerInstance(DeserializationConfig config,
@@ -51,27 +51,27 @@ public abstract JsonDeserializer> deserializerInstance(DeserializationConfig c
/**
* Method called to get an instance of key deserializer of specified type.
- *
+ *
* @param config Deserialization configuration in effect
* @param annotated Element (Class, Method, Field, constructor parameter) that
* had annotation defining class of key deserializer to construct (to allow
* implementation use information from other annotations)
* @param keyDeserClass Class of key deserializer instance to return
- *
+ *
* @return Key deserializer instance to use
*/
public abstract KeyDeserializer keyDeserializerInstance(DeserializationConfig config,
Annotated annotated, Class> keyDeserClass);
-
+
/**
* Method called to get an instance of serializer of specified type.
- *
+ *
* @param config Serialization configuration in effect
* @param annotated Element (Class, Method, Field) that
* had annotation defining class of serializer to construct (to allow
* implementation use information from other annotations)
* @param serClass Class of serializer instance to return
- *
+ *
* @return Serializer instance to use
*/
public abstract JsonSerializer> serializerInstance(SerializationConfig config,
@@ -79,14 +79,14 @@ public abstract JsonSerializer> serializerInstance(SerializationConfig config,
/**
* Method called to get an instance of TypeResolverBuilder of specified type.
- *
+ *
* @param config Mapper configuration in effect (either SerializationConfig or
* DeserializationConfig, depending on when instance is being constructed)
* @param annotated annotated Element (Class, Method, Field) that
* had annotation defining class of builder to construct (to allow
* implementation use information from other annotations)
* @param builderClass Class of builder instance to return
- *
+ *
* @return TypeResolverBuilder instance to use
*/
public abstract TypeResolverBuilder> typeResolverBuilderInstance(MapperConfig> config,
@@ -94,14 +94,14 @@ public abstract TypeResolverBuilder> typeResolverBuilderInstance(MapperConfig<
/**
* Method called to get an instance of TypeIdResolver of specified type.
- *
+ *
* @param config Mapper configuration in effect (either SerializationConfig or
* DeserializationConfig, depending on when instance is being constructed)
* @param annotated annotated Element (Class, Method, Field) that
* had annotation defining class of resolver to construct (to allow
* implementation use information from other annotations)
* @param resolverClass Class of resolver instance to return
- *
+ *
* @return TypeResolverBuilder instance to use
*/
public abstract TypeIdResolver typeIdResolverInstance(MapperConfig> config,
@@ -115,10 +115,10 @@ public ValueInstantiator valueInstantiatorInstance(MapperConfig> config,
return null;
}
-
+
/**
* Method called to construct a ObjectIdHandler instance of specified type.
- *
+ *
* @since 2.0
*/
public ObjectIdGenerator> objectIdGeneratorInstance(MapperConfig> config,
@@ -133,7 +133,7 @@ public ObjectIdResolver resolverIdGeneratorInstance(MapperConfig> config, Anno
/**
* Method called to construct a NamingStrategy instance used for specified
* class.
- *
+ *
* @since 2.1
*/
public PropertyNamingStrategy namingStrategyInstance(MapperConfig> config,
@@ -143,7 +143,7 @@ public PropertyNamingStrategy namingStrategyInstance(MapperConfig> config,
/**
* Method called to construct a Converter instance used for specified class.
- *
+ *
* @since 2.2
*/
public Converter,?> converterInstance(MapperConfig> config,
@@ -168,7 +168,7 @@ public VirtualBeanPropertyWriter virtualPropertyWriterInstance(MapperConfig> c
* excluded (true) or included (false)) to be used based on
* {@link com.fasterxml.jackson.annotation.JsonInclude} annotation (or
* equivalent).
- *
+ *
* Default implementation returns `null` to indicate that default instantiation
* (use zero-arg constructor of the filterClass
) should be
* used.
diff --git a/src/main/java/com/fasterxml/jackson/databind/cfg/JsonNodeFeature.java b/src/main/java/com/fasterxml/jackson/databind/cfg/JsonNodeFeature.java
index c14396b7bc..0dec57c022 100644
--- a/src/main/java/com/fasterxml/jackson/databind/cfg/JsonNodeFeature.java
+++ b/src/main/java/com/fasterxml/jackson/databind/cfg/JsonNodeFeature.java
@@ -30,7 +30,7 @@ public enum JsonNodeFeature implements DatatypeFeature
// // // Merge configuration settings
// // // 03-Aug-2022, tatu: Possible other additions:
-
+
// ALLOW_ARRAY_MERGE(true),
// ALLOW_OBJECT_MERGE(true),
diff --git a/src/main/java/com/fasterxml/jackson/databind/cfg/MapperBuilder.java b/src/main/java/com/fasterxml/jackson/databind/cfg/MapperBuilder.java
index 89556bf179..836ed6e1bf 100644
--- a/src/main/java/com/fasterxml/jackson/databind/cfg/MapperBuilder.java
+++ b/src/main/java/com/fasterxml/jackson/databind/cfg/MapperBuilder.java
@@ -616,7 +616,7 @@ public B defaultSetterInfo(JsonSetter.Value v) {
_mapper.setDefaultSetterInfo(v);
return _this();
}
-
+
/**
* Method for setting default Setter configuration, regarding things like
* merging, null-handling; used for properties for which there are
@@ -681,9 +681,9 @@ public B defaultLocale(Locale locale) {
/**
* Method that will configure default {@link Base64Variant} that
* byte[]
serializers and deserializers will use.
- *
+ *
* @param v Base64 variant to use
- *
+ *
* @return This builder instance to allow call chaining
*/
public B defaultBase64Variant(Base64Variant v) {
@@ -855,7 +855,7 @@ public B activateDefaultTyping(PolymorphicTypeValidator subtypeValidator,
*
* NOTE: choice of {@link PolymorphicTypeValidator} to pass is critical for security
* as allowing all subtypes can be risky for untrusted content.
- *
+ *
* @param applicability Defines kinds of types for which additional type information
* is added; see {@link DefaultTyping} for more information.
*/
diff --git a/src/main/java/com/fasterxml/jackson/databind/cfg/MapperConfig.java b/src/main/java/com/fasterxml/jackson/databind/cfg/MapperConfig.java
index bd9340ba9a..7206cc1635 100644
--- a/src/main/java/com/fasterxml/jackson/databind/cfg/MapperConfig.java
+++ b/src/main/java/com/fasterxml/jackson/databind/cfg/MapperConfig.java
@@ -91,7 +91,7 @@ protected MapperConfig(MapperConfig src, BaseSettings base)
_base = base;
_mapperFeatures = src._mapperFeatures;
}
-
+
protected MapperConfig(MapperConfig src)
{
_base = src._base;
@@ -118,7 +118,7 @@ public static & ConfigFeature> int collectFeatureDefaults(Cla
/* Life-cycle: factory methods
/**********************************************************
*/
-
+
/**
* Method for constructing and returning a new instance with specified
* mapper features enabled.
@@ -135,7 +135,7 @@ public static & ConfigFeature> int collectFeatureDefaults(Cla
* @since 2.3
*/
public abstract T with(MapperFeature feature, boolean state);
-
+
/*
/**********************************************************
/* Configuration: simple features
@@ -153,7 +153,7 @@ public final boolean isEnabled(MapperFeature f) {
/**
* "Bulk" access method for checking that all features specified by
* mask are enabled.
- *
+ *
* @since 2.3
*
* @deprecated Since 2.13 -- no replacement
@@ -162,11 +162,11 @@ public final boolean isEnabled(MapperFeature f) {
public final boolean hasMapperFeatures(int featureMask) {
return (_mapperFeatures & featureMask) == featureMask;
}
-
+
/**
* Method for determining whether annotation processing is enabled or not
* (default settings are typically that it is enabled; must explicitly disable).
- *
+ *
* @return True if annotation processing is enabled; false if not
*/
public final boolean isAnnotationProcessingEnabled() {
@@ -179,7 +179,7 @@ public final boolean isAnnotationProcessingEnabled() {
* to invoke non-public Constructors, Methods; or to instantiate non-public
* Classes. By default this is enabled, but on some platforms it needs to be
* prevented since if this would violate security constraints and cause failures.
- *
+ *
* @return True if access modifier overriding is allowed (and may be done for
* any Field, Method, Constructor or Class); false to prevent any attempts
* to override.
@@ -213,11 +213,11 @@ public final boolean shouldSortPropertiesAlphabetically() {
* Method for constructing a specialized textual object that can typically
* be serialized faster than basic {@link java.lang.String} (depending
* on escaping needed if any, char-to-byte encoding if needed).
- *
+ *
* @param src Text to represent
- *
+ *
* @return Optimized text object constructed
- *
+ *
* @since 2.4
*/
public SerializableString compileString(String src) {
@@ -227,13 +227,13 @@ public SerializableString compileString(String src) {
*/
return new SerializedString(src);
}
-
+
/*
/**********************************************************
/* Configuration: introspectors, mix-ins
/**********************************************************
*/
-
+
public ClassIntrospector getClassIntrospector() {
return _base.getClassIntrospector();
}
@@ -279,7 +279,7 @@ public final HandlerInstantiator getHandlerInstantiator() {
public final TypeResolverBuilder> getDefaultTyper(JavaType baseType) {
return _base.getTypeResolverBuilder();
}
-
+
public abstract SubtypeResolver getSubtypeResolver();
/**
@@ -391,7 +391,7 @@ public final BeanDescription introspectDirectClassAnnotations(JavaType type) {
* is found; no type hierarchy traversal is performed.
*
* @since 2.8
- *
+ *
* @return Override object to use for the type, if defined; null if none.
*/
public abstract ConfigOverride findConfigOverride(Class> type);
@@ -405,7 +405,7 @@ public final BeanDescription introspectDirectClassAnnotations(JavaType type) {
* is found; no type hierarchy traversal is performed.
*
* @since 2.9
- *
+ *
* @return Override object to use for the type, never null (but may be empty)
*/
public abstract ConfigOverride getConfigOverride(Class> type);
@@ -434,7 +434,7 @@ public final BeanDescription introspectDirectClassAnnotations(JavaType type) {
* if none found, returning given defaultIncl
*
* @param defaultIncl Inclusion setting to return if no overrides found.
- *
+ *
* @since 2.8.2
*/
public JsonInclude.Value getDefaultPropertyInclusion(Class> baseType,
@@ -584,7 +584,7 @@ public abstract VisibilityChecker> getDefaultVisibilityChecker(Class> baseTy
/* Configuration: other
/**********************************************************
*/
-
+
/**
* Method for accessing currently configured (textual) date format
* that will be used for reading or writing date values (in case
@@ -652,7 +652,7 @@ public Base64Variant getBase64Variant() {
* Method for accessing per-instance shared (baseline/default)
* attribute values; these are used as the basis for per-call
* attributes.
- *
+ *
* @since 2.3
*/
public abstract ContextAttributes getAttributes();
diff --git a/src/main/java/com/fasterxml/jackson/databind/cfg/MapperConfigBase.java b/src/main/java/com/fasterxml/jackson/databind/cfg/MapperConfigBase.java
index 40d6971bee..3c5b4fea16 100644
--- a/src/main/java/com/fasterxml/jackson/databind/cfg/MapperConfigBase.java
+++ b/src/main/java/com/fasterxml/jackson/databind/cfg/MapperConfigBase.java
@@ -53,7 +53,7 @@ public abstract class MapperConfigBase attributes) {
return with(getAttributes().withSharedAttributes(attributes));
}
-
+
/**
* Method for constructing an instance that has specified
* value for attribute for given key.
- *
+ *
* @since 2.3
*/
public T withAttribute(Object key, Object value) {
@@ -520,7 +520,7 @@ public T withAttribute(Object key, Object value) {
/**
* Method for constructing an instance that has no
* value for attribute for given key.
- *
+ *
* @since 2.3
*/
public T withoutAttribute(Object key) {
@@ -635,11 +635,11 @@ public final T with(TimeZone tz) {
* disable root name wrapping; and if null used, will instead use
* SerializationFeature
to determine if to use wrapping, and annotation
* (or default name) for actual root name to use.
- *
+ *
* @param rootName to use: if null, means "use default" (clear setting);
* if empty String ("") means that no root name wrapping is used;
* otherwise defines root name to use.
- *
+ *
* @since 2.6
*/
public abstract T withRootName(PropertyName rootName);
@@ -650,7 +650,7 @@ public T withRootName(String rootName) {
}
return withRootName(PropertyName.construct(rootName));
}
-
+
/**
* Method for constructing and returning a new instance with different
* {@link SubtypeResolver}
@@ -904,7 +904,7 @@ public final Class> findMixInClassFor(Class> cls) {
public MixInResolver copy() {
throw new UnsupportedOperationException();
}
-
+
/**
* Test-only method -- does not reflect possibly open-ended set that external
* mix-in resolver might provide.
diff --git a/src/main/java/com/fasterxml/jackson/databind/cfg/SerializerFactoryConfig.java b/src/main/java/com/fasterxml/jackson/databind/cfg/SerializerFactoryConfig.java
index 843763359f..2cc0e6967f 100644
--- a/src/main/java/com/fasterxml/jackson/databind/cfg/SerializerFactoryConfig.java
+++ b/src/main/java/com/fasterxml/jackson/databind/cfg/SerializerFactoryConfig.java
@@ -19,7 +19,7 @@ public final class SerializerFactoryConfig
protected final static Serializers[] NO_SERIALIZERS = new Serializers[0];
protected final static BeanSerializerModifier[] NO_MODIFIERS = new BeanSerializerModifier[0];
-
+
/**
* List of providers for additional serializers, checked before considering default
* basic or bean serialializers.
@@ -31,13 +31,13 @@ public final class SerializerFactoryConfig
* key serialializers.
*/
protected final Serializers[] _additionalKeySerializers;
-
+
/**
* List of modifiers that can change the way {@link BeanSerializer} instances
* are configured and constructed.
*/
protected final BeanSerializerModifier[] _modifiers;
-
+
public SerializerFactoryConfig() {
this(null, null, null);
}
@@ -70,7 +70,7 @@ public SerializerFactoryConfig withAdditionalKeySerializers(Serializers addition
Serializers[] all = ArrayBuilders.insertInListNoDup(_additionalKeySerializers, additional);
return new SerializerFactoryConfig(_additionalSerializers, all, _modifiers);
}
-
+
public SerializerFactoryConfig withSerializerModifier(BeanSerializerModifier modifier)
{
if (modifier == null) {
diff --git a/src/main/java/com/fasterxml/jackson/databind/deser/AbstractDeserializer.java b/src/main/java/com/fasterxml/jackson/databind/deser/AbstractDeserializer.java
index 2bef950710..4a5b846225 100644
--- a/src/main/java/com/fasterxml/jackson/databind/deser/AbstractDeserializer.java
+++ b/src/main/java/com/fasterxml/jackson/databind/deser/AbstractDeserializer.java
@@ -41,7 +41,7 @@ public class AbstractDeserializer
protected transient Map _properties;
// support for "native" types, which require special care:
-
+
protected final boolean _acceptString;
protected final boolean _acceptBoolean;
protected final boolean _acceptInt;
@@ -113,7 +113,7 @@ protected AbstractDeserializer(AbstractDeserializer base,
/**
* Factory method used when constructing instances for non-POJO types, like
* {@link java.util.Map}s.
- *
+ *
* @since 2.3
*/
public static AbstractDeserializer constructForNonPOJO(BeanDescription beanDesc) {
@@ -185,7 +185,7 @@ public JsonDeserializer> createContextual(DeserializationContext ctxt,
public Class> handledType() {
return _baseType.getRawClass();
}
-
+
@Override
public boolean isCachable() { return true; }
@@ -224,7 +224,7 @@ public ObjectIdReader getObjectIdReader() {
public SettableBeanProperty findBackReference(String logicalName) {
return (_backRefProperties == null) ? null : _backRefProperties.get(logicalName);
}
-
+
/*
/**********************************************************
/* Deserializer implementation
diff --git a/src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java b/src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
index 67aecb76d4..a1fbcdc76b 100644
--- a/src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
+++ b/src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
@@ -63,7 +63,7 @@ public abstract class BasicDeserializerFactory
/* Config
/**********************************************************
*/
-
+
/**
* Configuration settings for this factory; immutable instance (just like this
* factory), new version created via copy-constructor (fluent-style)
@@ -79,7 +79,7 @@ public abstract class BasicDeserializerFactory
protected BasicDeserializerFactory(DeserializerFactoryConfig config) {
_factoryConfig = config;
}
-
+
/**
* Method for getting current {@link DeserializerFactoryConfig}.
*
@@ -92,7 +92,7 @@ public DeserializerFactoryConfig getFactoryConfig() {
}
protected abstract DeserializerFactory withConfig(DeserializerFactoryConfig config);
-
+
/*
/********************************************************
/* Configuration handling: fluent factories
@@ -116,7 +116,7 @@ public final DeserializerFactory withAdditionalDeserializers(Deserializers addit
public final DeserializerFactory withAdditionalKeyDeserializers(KeyDeserializers additional) {
return withConfig(_factoryConfig.withAdditionalKeyDeserializers(additional));
}
-
+
/**
* Convenience method for creating a new factory instance with additional
* {@link BeanDeserializerModifier}.
@@ -321,7 +321,7 @@ protected Map _findCreatorsFromPro
AnnotatedWithParams owner = param.getOwner();
BeanPropertyDefinition[] defs = result.get(owner);
final int index = param.getIndex();
-
+
if (defs == null) {
if (result.isEmpty()) { // since emptyMap is immutable need to create a 'real' one
result = new LinkedHashMap();
@@ -340,7 +340,7 @@ protected Map _findCreatorsFromPro
}
return result;
}
-
+
public ValueInstantiator _valueInstantiatorInstance(DeserializationConfig config,
Annotated annotated, Object instDef)
throws JsonMappingException
@@ -350,7 +350,7 @@ public ValueInstantiator _valueInstantiatorInstance(DeserializationConfig config
}
ValueInstantiator inst;
-
+
if (instDef instanceof ValueInstantiator) {
return (ValueInstantiator) instDef;
}
@@ -651,7 +651,7 @@ protected void _addExplicitFactoryCreators(DeserializationContext ctxt,
if (creatorMode == JsonCreator.Mode.DISABLED) {
continue;
}
-
+
// zero-arg method factory methods fine, as long as explicit
if (argCount == 0) {
creators.setDefaultCreator(factory);
@@ -711,12 +711,12 @@ protected void _addImplicitFactoryCreators(DeserializationContext ctxt,
}
continue;
}
- AnnotatedParameter nonAnnotatedParam = null;
+ AnnotatedParameter nonAnnotatedParam = null;
SettableBeanProperty[] properties = new SettableBeanProperty[argCount];
int implicitNameCount = 0;
int explicitNameCount = 0;
int injectCount = 0;
-
+
for (int i = 0; i < argCount; ++i) {
final AnnotatedParameter param = factory.getParameter(i);
BeanPropertyDefinition propDef = (propDefs == null) ? null : propDefs[i];
@@ -769,7 +769,7 @@ protected void _addImplicitFactoryCreators(DeserializationContext ctxt,
}
}
final int namedCount = explicitNameCount + implicitNameCount;
-
+
// Ok: if named or injectable, we have more work to do
if (explicitNameCount > 0 || injectCount > 0) {
// simple case; everything covered:
@@ -793,7 +793,7 @@ protected void _addImplicitFactoryCreators(DeserializationContext ctxt,
/* Creator introspection: helper methods
/**********************************************************************
*/
-
+
/**
* Helper method called when there is the explicit "is-creator" with mode of "delegating"
*
@@ -1317,7 +1317,7 @@ protected PropertyMetadata _getSetterInfo(DeserializationContext ctxt,
/* DeserializerFactory impl: array deserializers
/**********************************************************
*/
-
+
@Override
public JsonDeserializer> createArrayDeserializer(DeserializationContext ctxt,
ArrayType type, final BeanDescription beanDesc)
@@ -1325,7 +1325,7 @@ public JsonDeserializer> createArrayDeserializer(DeserializationContext ctxt,
{
final DeserializationConfig config = ctxt.getConfig();
JavaType elemType = type.getContentType();
-
+
// Very first thing: is deserializer hard-coded for elements?
JsonDeserializer contentDeser = elemType.getValueHandler();
// Then optional type info: if type has been resolved, we may already know type deserializer:
@@ -1502,7 +1502,7 @@ public JsonDeserializer> createMapDeserializer(DeserializationContext ctxt,
final DeserializationConfig config = ctxt.getConfig();
JavaType keyType = type.getKeyType();
JavaType contentType = type.getContentType();
-
+
// First: is there annotation-specified deserializer for values?
@SuppressWarnings("unchecked")
JsonDeserializer contentDeser = (JsonDeserializer) contentType.getValueHandler();
@@ -1541,7 +1541,7 @@ public JsonDeserializer> createMapDeserializer(DeserializationContext ctxt,
}
// Otherwise, generic handler works ok.
-
+
/* But there is one more twist: if we are being asked to instantiate
* an interface or abstract Map, we need to either find something
* that implements the thing, or give up.
@@ -1620,11 +1620,11 @@ public JsonDeserializer> createMapLikeDeserializer(DeserializationContext ctxt
JavaType keyType = type.getKeyType();
JavaType contentType = type.getContentType();
final DeserializationConfig config = ctxt.getConfig();
-
+
// First: is there annotation-specified deserializer for values?
@SuppressWarnings("unchecked")
JsonDeserializer contentDeser = (JsonDeserializer) contentType.getValueHandler();
-
+
// Ok: need a key deserializer (null indicates 'default' here)
KeyDeserializer keyDes = (KeyDeserializer) keyType.getValueHandler();
/* !!! 24-Jan-2012, tatu: NOTE: impls MUST use resolve() to find key deserializer!
@@ -1656,7 +1656,7 @@ public JsonDeserializer> createMapLikeDeserializer(DeserializationContext ctxt
/* DeserializerFactory impl: other types
/**********************************************************
*/
-
+
/**
* Factory method for constructing serializers of {@link Enum} types.
*/
@@ -1701,7 +1701,7 @@ public JsonDeserializer> createEnumDeserializer(DeserializationContext ctxt,
break;
}
}
-
+
// Need to consider @JsonValue if one found
if (deser == null) {
deser = new EnumDeserializer(constructEnumResolver(enumClass,
@@ -1830,7 +1830,7 @@ public TypeDeserializer findTypeDeserializer(DeserializationConfig config,
/**
* Overridable method called after checking all other types.
- *
+ *
* @since 2.2
*/
protected JsonDeserializer> findOptionalStdDeserializer(DeserializationContext ctxt,
@@ -2016,7 +2016,7 @@ public boolean hasExplicitDeserializerFor(DeserializationConfig config,
*
* @param baseType Declared base type of the value to deserializer (actual
* deserializer type will be this type or its subtype)
- *
+ *
* @return Type deserializer to use for given base type, if one is needed; null if not.
*/
public TypeDeserializer findPropertyTypeDeserializer(DeserializationConfig config,
@@ -2024,7 +2024,7 @@ public TypeDeserializer findPropertyTypeDeserializer(DeserializationConfig confi
throws JsonMappingException
{
AnnotationIntrospector ai = config.getAnnotationIntrospector();
- TypeResolverBuilder> b = ai.findPropertyTypeResolver(config, annotated, baseType);
+ TypeResolverBuilder> b = ai.findPropertyTypeResolver(config, annotated, baseType);
// Defaulting: if no annotations on member, check value class
if (b == null) {
return findTypeDeserializer(config, baseType);
@@ -2040,7 +2040,7 @@ public TypeDeserializer findPropertyTypeDeserializer(DeserializationConfig confi
.withCause(e0);
}
}
-
+
/**
* Method called to find and create a type information deserializer for values of
* given container (list, array, map) property, if one is needed.
@@ -2048,16 +2048,16 @@ public TypeDeserializer findPropertyTypeDeserializer(DeserializationConfig confi
*
* Note that this method is only called for container bean properties,
* and not for values in container types or root values (or non-container properties)
- *
+ *
* @param containerType Type of property; must be a container type
* @param propertyEntity Field or method that contains container property
- */
+ */
public TypeDeserializer findPropertyContentTypeDeserializer(DeserializationConfig config,
JavaType containerType, AnnotatedMember propertyEntity)
throws JsonMappingException
{
AnnotationIntrospector ai = config.getAnnotationIntrospector();
- TypeResolverBuilder> b = ai.findPropertyContentTypeResolver(config, propertyEntity, containerType);
+ TypeResolverBuilder> b = ai.findPropertyContentTypeResolver(config, propertyEntity, containerType);
JavaType contentType = containerType.getContentType();
// Defaulting: if no annotations on member, check class
if (b == null) {
@@ -2073,7 +2073,7 @@ public TypeDeserializer findPropertyContentTypeDeserializer(DeserializationConfi
* Helper method called to find one of default serializers for "well-known"
* platform types: JDK-provided types, and small number of public Jackson
* API types.
- *
+ *
* @since 2.2
*/
public JsonDeserializer> findDefaultDeserializer(DeserializationContext ctxt,
@@ -2086,7 +2086,7 @@ public JsonDeserializer> findDefaultDeserializer(DeserializationContext ctxt,
// 11-Feb-2015, tatu: As per [databind#700] need to be careful wrt non-default Map, List.
DeserializationConfig config = ctxt.getConfig();
JavaType lt, mt;
-
+
if (_factoryConfig.hasAbstractTypeResolvers()) {
lt = _findRemappedType(config, List.class);
mt = _findRemappedType(config, Map.class);
@@ -2209,7 +2209,7 @@ protected JsonDeserializer> _findCustomArrayDeserializer(ArrayType type,
}
return null;
}
-
+
protected JsonDeserializer> _findCustomCollectionDeserializer(CollectionType type,
DeserializationConfig config, BeanDescription beanDesc,
TypeDeserializer elementTypeDeserializer, JsonDeserializer> elementDeserializer)
@@ -2224,7 +2224,7 @@ protected JsonDeserializer> _findCustomCollectionDeserializer(CollectionType t
}
return null;
}
-
+
protected JsonDeserializer> _findCustomCollectionLikeDeserializer(CollectionLikeType type,
DeserializationConfig config, BeanDescription beanDesc,
TypeDeserializer elementTypeDeserializer, JsonDeserializer> elementDeserializer)
@@ -2252,7 +2252,7 @@ protected JsonDeserializer> _findCustomEnumDeserializer(Class> type,
}
return null;
}
-
+
protected JsonDeserializer> _findCustomMapDeserializer(MapType type,
DeserializationConfig config, BeanDescription beanDesc,
KeyDeserializer keyDeserializer,
@@ -2290,7 +2290,7 @@ protected JsonDeserializer> _findCustomMapLikeDeserializer(MapLikeType type,
/* Helper methods, value/content/key type introspection
/**********************************************************
*/
-
+
/**
* Helper method called to check if a class or method
* has annotation that tells which class to use for deserialization; and if
@@ -2348,13 +2348,13 @@ protected JsonDeserializer findContentDeserializerFromAnnotation(Deseria
}
return null;
}
-
+
/**
* Helper method used to resolve additional type-related annotation information
* like type overrides, or handler (serializer, deserializer) overrides,
* so that from declared field, property or constructor parameter type
* is used as the base and modified based on annotations, if any.
- *
+ *
* @since 2.8 Combines functionality of modifyTypeByAnnotation
* and resolveType
*/
@@ -2389,7 +2389,7 @@ protected JavaType resolveMemberAndTypeAnnotations(DeserializationContext ctxt,
type = type.withContentValueHandler(cd);
}
TypeDeserializer contentTypeDeser = findPropertyContentTypeDeserializer(
- ctxt.getConfig(), type, (AnnotatedMember) member);
+ ctxt.getConfig(), type, (AnnotatedMember) member);
if (contentTypeDeser != null) {
type = type.withContentTypeHandler(contentTypeDeser);
}
@@ -2432,7 +2432,7 @@ protected boolean _hasCreatorAnnotation(DeserializationContext ctxt,
AnnotationIntrospector intr = ctxt.getAnnotationIntrospector();
if (intr != null) {
JsonCreator.Mode mode = intr.findCreatorAnnotation(ctxt.getConfig(), ann);
- return (mode != null) && (mode != JsonCreator.Mode.DISABLED);
+ return (mode != null) && (mode != JsonCreator.Mode.DISABLED);
}
return false;
}
@@ -2442,7 +2442,7 @@ protected boolean _hasCreatorAnnotation(DeserializationContext ctxt,
/* Deprecated helper methods
/**********************************************************
*/
-
+
/**
* Method called to see if given method has annotations that indicate
* a more specific type than what the argument specifies.
diff --git a/src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializer.java b/src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializer.java
index fe51b039f9..6a16a75d51 100644
--- a/src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializer.java
+++ b/src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializer.java
@@ -687,7 +687,7 @@ protected final Object deserializeWithView(JsonParser p, DeserializationContext
}
return bean;
}
-
+
/*
/**********************************************************
/* Handling for cases where we have "unwrapped" values
@@ -831,7 +831,7 @@ protected Object deserializeUsingPropertyBasedWithUnwrapped(JsonParser p, Deseri
// 01-Dec-2016, tatu: Note: This IS legal to call, but only when unwrapped
// value itself is NOT passed via `CreatorProperty` (which isn't supported).
// Ok however to pass via setter or field.
-
+
final PropertyBasedCreator creator = _propertyBasedCreator;
PropertyValueBuffer buffer = creator.startBuilding(p, ctxt, _objectIdReader);
@@ -870,7 +870,7 @@ protected Object deserializeUsingPropertyBasedWithUnwrapped(JsonParser p, Deseri
// 28-Aug-2018, tatu: Let's add sanity check here, easier to catch off-by-some
// problems if we maintain invariants
if (t != JsonToken.END_OBJECT) {
- ctxt.reportWrongTokenException(this, JsonToken.END_OBJECT,
+ ctxt.reportWrongTokenException(this, JsonToken.END_OBJECT,
"Attempted to unwrap '%s' value",
handledType().getName());
}
diff --git a/src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializerBase.java b/src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializerBase.java
index eff862455a..7f1b859f40 100644
--- a/src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializerBase.java
+++ b/src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializerBase.java
@@ -57,7 +57,7 @@ public abstract class BeanDeserializerBase
*/
/**
- * Object that handles details of constructing initial
+ * Object that handles details of constructing initial
* bean value (to which bind data to), unless instance
* is passed (via updateValue())
*/
@@ -222,7 +222,7 @@ protected BeanDeserializerBase(BeanDeserializerBuilder builder,
_delegateDeserializer = null;
_arrayDelegateDeserializer = null;
_propertyBasedCreator = null;
-
+
_beanProperties = properties;
_backRefs = backRefs;
_ignorableProps = ignorableProps;
@@ -269,14 +269,14 @@ protected BeanDeserializerBase(BeanDeserializerBase src) {
protected BeanDeserializerBase(BeanDeserializerBase src, boolean ignoreAllUnknown)
{
super(src._beanType);
-
+
_beanType = src._beanType;
-
+
_valueInstantiator = src._valueInstantiator;
_delegateDeserializer = src._delegateDeserializer;
_arrayDelegateDeserializer = src._arrayDelegateDeserializer;
_propertyBasedCreator = src._propertyBasedCreator;
-
+
_beanProperties = src._beanProperties;
_backRefs = src._backRefs;
_ignorableProps = src._ignorableProps;
@@ -285,7 +285,7 @@ protected BeanDeserializerBase(BeanDeserializerBase src, boolean ignoreAllUnknow
_anySetter = src._anySetter;
_injectables = src._injectables;
_objectIdReader = src._objectIdReader;
-
+
_nonStandardCreation = src._nonStandardCreation;
_unwrappedPropertyHandler = src._unwrappedPropertyHandler;
_needViewProcesing = src._needViewProcesing;
@@ -299,7 +299,7 @@ protected BeanDeserializerBase(BeanDeserializerBase src, NameTransformer unwrapp
super(src._beanType);
_beanType = src._beanType;
-
+
_valueInstantiator = src._valueInstantiator;
_delegateDeserializer = src._delegateDeserializer;
_arrayDelegateDeserializer = src._arrayDelegateDeserializer;
@@ -338,19 +338,19 @@ public BeanDeserializerBase(BeanDeserializerBase src, ObjectIdReader oir)
{
super(src._beanType);
_beanType = src._beanType;
-
+
_valueInstantiator = src._valueInstantiator;
_delegateDeserializer = src._delegateDeserializer;
_arrayDelegateDeserializer = src._arrayDelegateDeserializer;
_propertyBasedCreator = src._propertyBasedCreator;
-
+
_backRefs = src._backRefs;
_ignorableProps = src._ignorableProps;
_ignoreAllUnknown = src._ignoreAllUnknown;
_includableProps = src._includableProps;
_anySetter = src._anySetter;
_injectables = src._injectables;
-
+
_nonStandardCreation = src._nonStandardCreation;
_unwrappedPropertyHandler = src._unwrappedPropertyHandler;
_needViewProcesing = src._needViewProcesing;
@@ -381,7 +381,7 @@ public BeanDeserializerBase(BeanDeserializerBase src,
{
super(src._beanType);
_beanType = src._beanType;
-
+
_valueInstantiator = src._valueInstantiator;
_delegateDeserializer = src._delegateDeserializer;
_arrayDelegateDeserializer = src._arrayDelegateDeserializer;
@@ -428,7 +428,7 @@ protected BeanDeserializerBase(BeanDeserializerBase src, BeanPropertyMap beanPro
_anySetter = src._anySetter;
_injectables = src._injectables;
_objectIdReader = src._objectIdReader;
-
+
_nonStandardCreation = src._nonStandardCreation;
_unwrappedPropertyHandler = src._unwrappedPropertyHandler;
_needViewProcesing = src._needViewProcesing;
@@ -442,7 +442,7 @@ protected BeanDeserializerBase(BeanDeserializerBase src, Set ignorablePr
{
this(src, ignorableProps, src._includableProps);
}
-
+
@Override
public abstract JsonDeserializer unwrappingDeserializer(NameTransformer unwrapper);
@@ -468,7 +468,7 @@ public BeanDeserializerBase withBeanProperties(BeanPropertyMap props) {
throw new UnsupportedOperationException("Class "+getClass().getName()
+" does not override `withBeanProperties()`, needs to");
}
-
+
/**
* Fluent factory for creating a variant that can handle
* POJO output as a JSON Array. Implementations may ignore this request
@@ -644,7 +644,7 @@ public void resolve(DeserializationContext ctxt) throws JsonMappingException
// we consider this non-standard, to offline handling
_nonStandardCreation = true;
}
-
+
_unwrappedPropertyHandler = unwrapped;
if (unwrapped != null) { // we consider this non-standard, to offline handling
_nonStandardCreation = true;
@@ -760,7 +760,7 @@ public JsonDeserializer> createContextual(DeserializationContext ctxt,
if (objectIdInfo != null) { // some code duplication here as well (from BeanDeserializerFactory)
// 2.1: allow modifications by "id ref" annotations as well:
objectIdInfo = intr.findObjectReferenceInfo(accessor, objectIdInfo);
-
+
Class> implClass = objectIdInfo.getGeneratorType();
// Property-based generator is trickier
JavaType idType;
@@ -987,7 +987,7 @@ protected SettableBeanProperty _resolveMergeAndNullSettings(DeserializationConte
if (merge != null) {
JsonDeserializer> valueDeser = prop.getValueDeserializer();
Boolean mayMerge = valueDeser.supportsUpdate(ctxt.getConfig());
-
+
if (mayMerge == null) {
// we don't really know if it's ok; so only use if explicitly specified
if (merge.fromDefaults) {
@@ -1061,7 +1061,7 @@ public Object getEmptyValue(DeserializationContext ctxt) throws JsonMappingExcep
/**
* Accessor for checking whether this deserializer is operating
* in case-insensitive manner.
- *
+ *
* @return True if this deserializer should match property names without
* considering casing; false if case has to match exactly.
*
@@ -1078,7 +1078,7 @@ public Boolean supportsUpdate(DeserializationConfig config) {
// bean settings...
return Boolean.TRUE;
}
-
+
@Override
public Class> handledType() {
return _beanType.getRawClass();
@@ -1093,7 +1093,7 @@ public Class> handledType() {
public ObjectIdReader getObjectIdReader() {
return _objectIdReader;
}
-
+
public boolean hasProperty(String propertyName) {
return _beanProperties.find(propertyName) != null;
}
@@ -1101,11 +1101,11 @@ public boolean hasProperty(String propertyName) {
public boolean hasViews() {
return _needViewProcesing;
}
-
+
/**
* Accessor for checking number of deserialized properties.
*/
- public int getPropertyCount() {
+ public int getPropertyCount() {
return _beanProperties.size();
}
@@ -1167,7 +1167,7 @@ public SettableBeanProperty findProperty(PropertyName propertyName)
// TODO: start matching full name?
return findProperty(propertyName.getSimpleName());
}
-
+
/**
* Accessor for finding the property with given name, if POJO
* has one. Name used is the external name, i.e. name used
@@ -1204,7 +1204,7 @@ public SettableBeanProperty findProperty(int propertyIndex)
}
return prop;
}
-
+
/**
* Method needed by {@link BeanDeserializerFactory} to properly link
* managed- and back-reference pairs.
@@ -1684,7 +1684,7 @@ protected void handleUnknownVanilla(JsonParser p, DeserializationContext ctxt,
}
} else {
// Unknown: let's call handler method
- handleUnknownProperty(p, ctxt, beanOrBuilder, propName);
+ handleUnknownProperty(p, ctxt, beanOrBuilder, propName);
}
}
@@ -1736,10 +1736,10 @@ protected void handleIgnoredProperty(JsonParser p, DeserializationContext ctxt,
* (in addition to buffered properties); if null, all properties are passed
* in buffer
*/
- protected Object handlePolymorphic(JsonParser p, DeserializationContext ctxt,
+ protected Object handlePolymorphic(JsonParser p, DeserializationContext ctxt,
Object bean, TokenBuffer unknownTokens)
throws IOException
- {
+ {
// First things first: maybe there is a more specific deserializer available?
JsonDeserializer subDeser = _findSubclassDeserializer(ctxt, bean, unknownTokens);
if (subDeser != null) {
@@ -1774,7 +1774,7 @@ protected Object handlePolymorphic(JsonParser p, DeserializationContext ctxt,
protected JsonDeserializer _findSubclassDeserializer(DeserializationContext ctxt,
Object bean, TokenBuffer unknownTokens)
throws IOException
- {
+ {
JsonDeserializer subDeser;
// First: maybe we have already created sub-type deserializer?
@@ -1800,7 +1800,7 @@ protected JsonDeserializer _findSubclassDeserializer(DeserializationCont
_subDeserializers = new HashMap>();;
}
_subDeserializers.put(new ClassKey(bean.getClass()), subDeser);
- }
+ }
}
return subDeser;
}
@@ -1830,7 +1830,7 @@ public void wrapAndThrow(Throwable t, Object bean, String fieldName, Deserializa
throw JsonMappingException.wrapWithPath(throwOrReturnThrowable(t, ctxt), bean, fieldName);
}
- private Throwable throwOrReturnThrowable(Throwable t, DeserializationContext ctxt)
+ private Throwable throwOrReturnThrowable(Throwable t, DeserializationContext ctxt)
throws IOException
{
/* 05-Mar-2009, tatu: But one nasty edge is when we get
diff --git a/src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializerBuilder.java b/src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializerBuilder.java
index fec1181f4b..200784d3e2 100644
--- a/src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializerBuilder.java
+++ b/src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializerBuilder.java
@@ -122,7 +122,7 @@ public class BeanDeserializerBuilder
public BeanDeserializerBuilder(BeanDescription beanDesc,
DeserializationContext ctxt)
- {
+ {
_beanDesc = beanDesc;
_context = ctxt;
_config = ctxt.getConfig();
@@ -305,13 +305,13 @@ public void setPOJOBuilder(AnnotatedMethod buildMethod, JsonPOJOBuilder.Value co
_buildMethod = buildMethod;
_builderConfig = config;
}
-
+
/*
/**********************************************************
/* Public accessors
/**********************************************************
*/
-
+
/**
* Method that allows accessing all properties that this
* builder currently contains.
@@ -339,7 +339,7 @@ public SettableBeanProperty removeProperty(PropertyName name) {
public SettableAnyProperty getAnySetter() {
return _anySetter;
}
-
+
public ValueInstantiator getValueInstantiator() {
return _valueInstantiator;
}
@@ -419,7 +419,7 @@ public JsonDeserializer> build()
* Alternate build method used when we must be using some form of
* abstract resolution, usually by using addition Type Id
* ("polymorphic deserialization")
- *
+ *
* @since 2.0
*/
public AbstractDeserializer buildAbstract() {
@@ -541,7 +541,7 @@ protected void _fixAccess(Collection mainProps)
// 15-Sep-2016, tatu: Access via back-ref properties has been done earlier
// as it has to, for some reason, so not repeated here.
-/*
+/*
if (_backRefProperties != null) {
for (SettableBeanProperty prop : _backRefProperties.values()) {
try {
@@ -556,7 +556,7 @@ protected void _fixAccess(Collection mainProps)
// 17-Jun-2020, tatu: Despite [databind#2760], it seems that methods that
// are explicitly defined (any setter via annotation, builder too) can not
// be left as-is? May reconsider based on feedback
-
+
if (_anySetter != null) {
try {
_anySetter.fixAccess(_config);
diff --git a/src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializerFactory.java b/src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializerFactory.java
index 671e84b800..8487b1e049 100644
--- a/src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializerFactory.java
+++ b/src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializerFactory.java
@@ -45,7 +45,7 @@ public class BeanDeserializerFactory
/* Life-cycle
/**********************************************************
*/
-
+
/**
* Globally shareable thread-safe instance which has no additional custom deserializers
* registered
@@ -56,7 +56,7 @@ public class BeanDeserializerFactory
public BeanDeserializerFactory(DeserializerFactoryConfig config) {
super(config);
}
-
+
/**
* Method used by module registration functionality, to construct a new bean
* deserializer factory
@@ -77,7 +77,7 @@ public DeserializerFactory withConfig(DeserializerFactoryConfig config)
ClassUtil.verifyMustOverride(BeanDeserializerFactory.class, this, "withConfig");
return new BeanDeserializerFactory(config);
}
-
+
/*
/**********************************************************
/* DeserializerFactory API implementation
@@ -280,7 +280,7 @@ public JsonDeserializer buildBeanDeserializer(DeserializationContext ctx
// managed/back reference fields/setters need special handling... first part
addBackReferenceProperties(ctxt, beanDesc, builder);
addInjectables(ctxt, beanDesc, builder);
-
+
final DeserializationConfig config = ctxt.getConfig();
if (_factoryConfig.hasDeserializerModifiers()) {
for (BeanDeserializerModifier mod : _factoryConfig.deserializerModifiers()) {
@@ -303,7 +303,7 @@ public JsonDeserializer buildBeanDeserializer(DeserializationContext ctx
}
return (JsonDeserializer) deserializer;
}
-
+
/**
* Method for constructing a bean deserializer that uses specified
* intermediate Builder for binding data, and construction of the
@@ -336,7 +336,7 @@ protected JsonDeserializer buildBuilderBasedDeserializer(
// And then "with methods" for deserializing from JSON Object
addBeanProps(ctxt, builderDesc, builder);
addObjectIdReader(ctxt, builderDesc, builder);
-
+
// managed/back reference fields/setters need special handling... first part
addBackReferenceProperties(ctxt, builderDesc, builder);
addInjectables(ctxt, builderDesc, builder);
@@ -344,7 +344,7 @@ protected JsonDeserializer buildBuilderBasedDeserializer(
JsonPOJOBuilder.Value builderConfig = builderDesc.findPOJOBuilderConfig();
final String buildMethodName = (builderConfig == null) ?
JsonPOJOBuilder.DEFAULT_BUILD_METHOD : builderConfig.buildMethodName;
-
+
// and lastly, find build method to use:
AnnotatedMethod buildMethod = builderDesc.findMethod(buildMethodName, null);
if (buildMethod != null) { // note: can't yet throw error; may be given build method
@@ -370,7 +370,7 @@ protected JsonDeserializer buildBuilderBasedDeserializer(
}
return (JsonDeserializer) deserializer;
}
-
+
protected void addObjectIdReader(DeserializationContext ctxt,
BeanDescription beanDesc, BeanDeserializerBuilder builder)
throws JsonMappingException
@@ -409,7 +409,7 @@ protected void addObjectIdReader(DeserializationContext ctxt,
builder.setObjectIdReader(ObjectIdReader.construct(idType,
objectIdInfo.getPropertyName(), gen, deser, idProp, resolver));
}
-
+
@SuppressWarnings("unchecked")
public JsonDeserializer buildThrowableDeserializer(DeserializationContext ctxt,
JavaType type, BeanDescription beanDesc)
@@ -492,7 +492,7 @@ protected BeanDeserializerBuilder constructBeanDeserializerBuilder(Deserializati
BeanDescription beanDesc) {
return new BeanDeserializerBuilder(beanDesc, ctxt);
}
-
+
/**
* Method called to figure out settable properties for the
* bean deserializer to use.
@@ -574,7 +574,7 @@ protected void addBeanProps(DeserializationContext ctxt,
// At which point we still have all kinds of properties; not all with mutators:
for (BeanPropertyDefinition propDef : propDefs) {
SettableBeanProperty prop = null;
-
+
// 18-Oct-2013, tatu: Although constructor parameters have highest precedence,
// we need to do linkage (as per [databind#318]), and so need to start with
// other types, and only then create constructor parameter, if any.
@@ -794,7 +794,7 @@ protected void addInjectables(DeserializationContext ctxt,
* Method called to construct fallback {@link SettableAnyProperty}
* for handling unknown bean properties, given a method that
* has been designated as such setter.
- *
+ *
* @param mutator Either 2-argument method (setter, with key and value), or Field
* that contains Map; either way accessor used for passing "any values"
*/
@@ -803,7 +803,7 @@ protected SettableAnyProperty constructAnySetter(DeserializationContext ctxt,
BeanDescription beanDesc, AnnotatedMember mutator)
throws JsonMappingException
{
- //find the java type based on the annotated setter method or setter field
+ //find the java type based on the annotated setter method or setter field
BeanProperty prop;
JavaType keyType;
JavaType valueType;
@@ -853,7 +853,7 @@ protected SettableAnyProperty constructAnySetter(DeserializationContext ctxt,
"Unrecognized mutator type for any-setter: %s",
ClassUtil.nameOf(mutator.getClass())));
}
- // First: see if there are explicitly specified
+ // First: see if there are explicitly specified
// and then possible direct deserializer override on accessor
KeyDeserializer keyDeser = findKeyDeserializerFromAnnotation(ctxt, mutator);
if (keyDeser == null) {
@@ -968,7 +968,7 @@ protected SettableBeanProperty constructSetterlessProperty(DeserializationContex
/**
* Helper method used to skip processing for types that we know
- * cannot be (i.e. are never consider to be) beans:
+ * cannot be (i.e. are never consider to be) beans:
* things like primitives, Arrays, Enums, and proxy types.
*
* Note that usually we shouldn't really be getting these sort of
diff --git a/src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializerModifier.java b/src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializerModifier.java
index 36176234e4..72c69661ff 100644
--- a/src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializerModifier.java
+++ b/src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializerModifier.java
@@ -52,7 +52,7 @@ public abstract class BeanDeserializerModifier
* initial list of {@link BeanPropertyDefinition}s, and done basic by-name
* and by-type filtering, but before constructing builder or actual
* property handlers; or arranging order.
- *
+ *
* The most common changes to make at this point are to completely remove
* specified properties, or rename then: other modifications are easier
* to make at later points.
@@ -126,15 +126,15 @@ public JsonDeserializer> modifyReferenceDeserializer(DeserializationConfig con
* {@link ArrayType}
* to make it possible to either replace or augment this deserializer with
* additional functionality.
- *
+ *
* @param config Configuration in use
* @param valueType Type of the value deserializer is used for.
* @param beanDesc Description f
* @param deserializer Default deserializer that would be used.
- *
+ *
* @return Deserializer to use; either deserializer
that was passed
* in, or an instance method constructed.
- *
+ *
* @since 2.2
*/
public JsonDeserializer> modifyArrayDeserializer(DeserializationConfig config,
@@ -192,7 +192,7 @@ public JsonDeserializer> modifyMapLikeDeserializer(DeserializationConfig confi
* This make it possible to replace the default key deserializer, or augment
* it somehow (including optional use of default deserializer with occasional
* override).
- *
+ *
* @since 2.2
*/
public KeyDeserializer modifyKeyDeserializer(DeserializationConfig config,
diff --git a/src/main/java/com/fasterxml/jackson/databind/deser/BuilderBasedDeserializer.java b/src/main/java/com/fasterxml/jackson/databind/deser/BuilderBasedDeserializer.java
index 2dd7928919..50e2dce169 100644
--- a/src/main/java/com/fasterxml/jackson/databind/deser/BuilderBasedDeserializer.java
+++ b/src/main/java/com/fasterxml/jackson/databind/deser/BuilderBasedDeserializer.java
@@ -182,7 +182,7 @@ public Boolean supportsUpdate(DeserializationConfig config) {
// 26-Oct-2016, tatu: No, we can't merge Builder-based POJOs as of now
return Boolean.FALSE;
}
-
+
/*
/**********************************************************
/* JsonDeserializer implementation
@@ -360,7 +360,7 @@ public Object deserializeFromObject(JsonParser p, DeserializationContext ctxt)
protected Object _deserializeUsingPropertyBased(final JsonParser p,
final DeserializationContext ctxt)
throws IOException
- {
+ {
final PropertyBasedCreator creator = _propertyBasedCreator;
PropertyValueBuffer buffer = creator.startBuilding(p, ctxt, _objectIdReader);
final Class> activeView = _needViewProcesing ? ctxt.getActiveView() : null;
@@ -450,7 +450,7 @@ protected Object _deserializeUsingPropertyBased(final JsonParser p,
protected final Object _deserialize(JsonParser p,
DeserializationContext ctxt, Object builder) throws IOException
- {
+ {
if (_injectables != null) {
injectValues(ctxt, builder);
}
@@ -481,7 +481,7 @@ protected final Object _deserialize(JsonParser p,
// Skip field name:
p.nextToken();
SettableBeanProperty prop = _beanProperties.find(propName);
-
+
if (prop != null) { // normal case
try {
builder = prop.deserializeSetAndReturn(p, ctxt, builder);
diff --git a/src/main/java/com/fasterxml/jackson/databind/deser/ContextualDeserializer.java b/src/main/java/com/fasterxml/jackson/databind/deser/ContextualDeserializer.java
index 9db1f7530d..b213d7ffa3 100644
--- a/src/main/java/com/fasterxml/jackson/databind/deser/ContextualDeserializer.java
+++ b/src/main/java/com/fasterxml/jackson/databind/deser/ContextualDeserializer.java
@@ -24,17 +24,17 @@ public interface ContextualDeserializer
* as a result method should NOT modify this instance but rather construct
* and return a new instance. This instance should only be returned as-is, in case
* it is already suitable for use.
- *
- * @param ctxt Deserialization context to access configuration, additional
+ *
+ * @param ctxt Deserialization context to access configuration, additional
* deserializers that may be needed by this deserializer
* @param property Method, field or constructor parameter that represents the property
* (and is used to assign deserialized value).
* Should be available; but there may be cases where caller cannot provide it and
* null is passed instead (in which case impls usually pass 'this' deserializer as is)
- *
+ *
* @return Deserializer to use for deserializing values of specified property;
* may be this instance or a new instance.
- *
+ *
* @throws JsonMappingException
*/
public JsonDeserializer> createContextual(DeserializationContext ctxt,
diff --git a/src/main/java/com/fasterxml/jackson/databind/deser/ContextualKeyDeserializer.java b/src/main/java/com/fasterxml/jackson/databind/deser/ContextualKeyDeserializer.java
index 897dc799d5..118b8b870b 100644
--- a/src/main/java/com/fasterxml/jackson/databind/deser/ContextualKeyDeserializer.java
+++ b/src/main/java/com/fasterxml/jackson/databind/deser/ContextualKeyDeserializer.java
@@ -18,13 +18,13 @@ public interface ContextualKeyDeserializer
* as a result method should NOT modify this instance but rather construct
* and return a new instance. This instance should only be returned as-is, in case
* it is already suitable for use.
- *
- * @param ctxt Deserialization context to access configuration, additional
+ *
+ * @param ctxt Deserialization context to access configuration, additional
* deserializers that may be needed by this deserializer
* @param property Method, field or constructor parameter that declared Map for which
* contextual instance will be used. Will not be available when deserializing root-level
* Map value; otherwise should not be null.
- *
+ *
* @return Key deserializer to use for deserializing keys specified Map property,
* may be this instance or a new instance.
*/
diff --git a/src/main/java/com/fasterxml/jackson/databind/deser/CreatorProperty.java b/src/main/java/com/fasterxml/jackson/databind/deser/CreatorProperty.java
index fd24c9d369..5e7ce8c98d 100644
--- a/src/main/java/com/fasterxml/jackson/databind/deser/CreatorProperty.java
+++ b/src/main/java/com/fasterxml/jackson/databind/deser/CreatorProperty.java
@@ -54,7 +54,7 @@ public class CreatorProperty
*
* Mutable only to allow setting after construction, but must be strictly
* set before any use.
- *
+ *
* @since 2.3
*/
protected SettableBeanProperty _fallbackSetter;
@@ -122,7 +122,7 @@ public CreatorProperty(PropertyName name, JavaType type, PropertyName wrapperNam
* method parameter; used for accessing annotations of the property
* @param injectable Information about injectable value, if any
* @param index Index of this property within creator invocation
- *
+ *
* @since 2.11
*/
public static CreatorProperty construct(PropertyName name, JavaType type, PropertyName wrapperName,
@@ -134,7 +134,7 @@ public static CreatorProperty construct(PropertyName name, JavaType type, Proper
return new CreatorProperty(name, type, wrapperName, typeDeser, contextAnnotations,
param, index, injectable, metadata);
}
-
+
/**
* @since 2.3
*/
@@ -161,7 +161,7 @@ protected CreatorProperty(CreatorProperty src, JsonDeserializer> deser,
public SettableBeanProperty withName(PropertyName newName) {
return new CreatorProperty(this, newName);
}
-
+
@Override
public SettableBeanProperty withValueDeserializer(JsonDeserializer> deser) {
if (_valueDeserializer == deser) {
@@ -176,7 +176,7 @@ public SettableBeanProperty withValueDeserializer(JsonDeserializer> deser) {
public SettableBeanProperty withNullProvider(NullValueProvider nva) {
return new CreatorProperty(this, _valueDeserializer, nva);
}
-
+
@Override
public void fixAccess(DeserializationConfig config) {
if (_fallbackSetter != null) {
@@ -187,7 +187,7 @@ public void fixAccess(DeserializationConfig config) {
/**
* NOTE: one exception to immutability, due to problems with CreatorProperty instances
* being shared between Bean, separate PropertyBasedCreator
- *
+ *
* @since 2.6
*/
public void setFallbackSetter(SettableBeanProperty fallbackSetter) {
@@ -242,7 +242,7 @@ public void inject(DeserializationContext context, Object beanInstance) throws I
/* BeanProperty impl
/**********************************************************
*/
-
+
@Override
public A getAnnotation(Class acls) {
if (_annotated == null) {
@@ -278,7 +278,7 @@ public Object deserializeSetAndReturn(JsonParser p,
_verifySetter();
return _fallbackSetter.setAndReturn(instance, deserialize(p, ctxt));
}
-
+
@Override
public void set(Object instance, Object value) throws IOException
{
@@ -325,7 +325,7 @@ public boolean isInjectionOnly() {
/* Overridden methods, other
/**********************************************************
*/
-
+
@Override
public String toString() { return "[creator property, name "+ClassUtil.name(getName())+"; inject id '"+getInjectableValueId()+"']"; }
diff --git a/src/main/java/com/fasterxml/jackson/databind/deser/DataFormatReaders.java b/src/main/java/com/fasterxml/jackson/databind/deser/DataFormatReaders.java
index c4bbcb8c17..6246572dd5 100644
--- a/src/main/java/com/fasterxml/jackson/databind/deser/DataFormatReaders.java
+++ b/src/main/java/com/fasterxml/jackson/databind/deser/DataFormatReaders.java
@@ -14,7 +14,7 @@
/**
* Alternative to {@link DataFormatDetector} that needs to be used when
* using data-binding.
- *
+ *
* @since 2.1
*/
public class DataFormatReaders
@@ -25,7 +25,7 @@ public class DataFormatReaders
* leniency to support data formats that need more complex heuristics.
*/
public final static int DEFAULT_MAX_INPUT_LOOKAHEAD = 64;
-
+
/**
* Ordered list of readers which both represent data formats to
* detect (in precedence order, starting with highest) and contain
@@ -36,14 +36,14 @@ public class DataFormatReaders
/**
* Strength of match we consider to be good enough to be used
* without checking any other formats.
- * Default value is {@link MatchStrength#SOLID_MATCH},
+ * Default value is {@link MatchStrength#SOLID_MATCH},
*/
protected final MatchStrength _optimalMatch;
/**
* Strength of minimal match we accept as the answer, unless
- * better matches are found.
- * Default value is {@link MatchStrength#WEAK_MATCH},
+ * better matches are found.
+ * Default value is {@link MatchStrength#WEAK_MATCH},
*/
protected final MatchStrength _minimalMatch;
@@ -54,13 +54,13 @@ public class DataFormatReaders
* Default value is {@link #DEFAULT_MAX_INPUT_LOOKAHEAD}.
*/
protected final int _maxInputLookahead;
-
+
/*
/**********************************************************
/* Construction
/**********************************************************
*/
-
+
public DataFormatReaders(ObjectReader... detectors) {
this(detectors, MatchStrength.SOLID_MATCH, MatchStrength.WEAK_MATCH,
DEFAULT_MAX_INPUT_LOOKAHEAD);
@@ -79,13 +79,13 @@ private DataFormatReaders(ObjectReader[] detectors,
_minimalMatch = minMatch;
_maxInputLookahead = maxInputLookahead;
}
-
+
/*
/**********************************************************
/* Fluent factories for changing match settings
/**********************************************************
*/
-
+
public DataFormatReaders withOptimalMatch(MatchStrength optMatch) {
if (optMatch == _optimalMatch) {
return this;
@@ -103,7 +103,7 @@ public DataFormatReaders withMinimalMatch(MatchStrength minMatch) {
public DataFormatReaders with(ObjectReader[] readers) {
return new DataFormatReaders(readers, _optimalMatch, _minimalMatch, _maxInputLookahead);
}
-
+
public DataFormatReaders withMaxInputLookahead(int lookaheadBytes)
{
if (lookaheadBytes == _maxInputLookahead) {
@@ -137,7 +137,7 @@ public DataFormatReaders withType(JavaType type)
}
return new DataFormatReaders(r, _optimalMatch, _minimalMatch, _maxInputLookahead);
}
-
+
/*
/**********************************************************
/* Public API
@@ -148,7 +148,7 @@ public DataFormatReaders withType(JavaType type)
* Method to call to find format that content (accessible via given
* {@link InputStream}) given has, as per configuration of this detector
* instance.
- *
+ *
* @return Matcher object which contains result; never null, even in cases
* where no match (with specified minimal match strength) is found.
*/
@@ -160,7 +160,7 @@ public Match findFormat(InputStream in) throws IOException
/**
* Method to call to find format that given content (full document)
* has, as per configuration of this detector instance.
- *
+ *
* @return Matcher object which contains result; never null, even in cases
* where no match (with specified minimal match strength) is found.
*/
@@ -172,17 +172,17 @@ public Match findFormat(byte[] fullInputData) throws IOException
/**
* Method to call to find format that given content (full document)
* has, as per configuration of this detector instance.
- *
+ *
* @return Matcher object which contains result; never null, even in cases
* where no match (with specified minimal match strength) is found.
- *
+ *
* @since 2.1
*/
public Match findFormat(byte[] fullInputData, int offset, int len) throws IOException
{
return _findFormat(new AccessorForReader(fullInputData, offset, len));
}
-
+
/*
/**********************************************************
/* Overrides
@@ -205,7 +205,7 @@ public String toString()
sb.append(']');
return sb.toString();
}
-
+
/*
/**********************************************************
/* Internal methods
@@ -266,7 +266,7 @@ public Match createMatcher(ObjectReader match, MatchStrength matchStrength)
match, matchStrength);
}
}
-
+
/**
* Result class, similar to {@link DataFormatMatcher}
*/
@@ -283,7 +283,7 @@ public static class Match
* Pointer to the first byte in buffer available for reading
*/
protected final int _bufferedStart;
-
+
/**
* Number of bytes available in buffer.
*/
@@ -298,7 +298,7 @@ public static class Match
* Strength of match with {@link #_match}
*/
protected final MatchStrength _matchStrength;
-
+
protected Match(InputStream in, byte[] buffered,
int bufferedStart, int bufferedLength,
ObjectReader match, MatchStrength strength)
@@ -346,13 +346,13 @@ public MatchStrength getMatchStrength() {
public String getMatchedFormatName() {
return _match.getFactory().getFormatName();
}
-
+
/*
/**********************************************************
/* Public API, factory methods
/**********************************************************
*/
-
+
/**
* Convenience method for trying to construct a {@link JsonParser} for
* parsing content which is assumed to be in detected data format.
@@ -369,7 +369,7 @@ public JsonParser createParserWithMatch() throws IOException
}
return jf.createParser(getDataStream());
}
-
+
/**
* Method to use for accessing input for which format detection has been done.
* This must be used instead of using stream passed to detector
@@ -382,7 +382,7 @@ public InputStream getDataStream() {
return new ByteArrayInputStream(_bufferedData, _bufferedStart, _bufferedLength);
}
return new MergedStream(null, _originalStream, _bufferedData, _bufferedStart, _bufferedLength);
- }
+ }
}
-
+
}
diff --git a/src/main/java/com/fasterxml/jackson/databind/deser/DefaultDeserializationContext.java b/src/main/java/com/fasterxml/jackson/databind/deser/DefaultDeserializationContext.java
index 2fcbaa5b52..0e57e3ccb0 100644
--- a/src/main/java/com/fasterxml/jackson/databind/deser/DefaultDeserializationContext.java
+++ b/src/main/java/com/fasterxml/jackson/databind/deser/DefaultDeserializationContext.java
@@ -73,7 +73,7 @@ protected DefaultDeserializationContext(DefaultDeserializationContext src) {
* properly; specifically, that caches are cleared, but settings
* will otherwise remain identical; and that no sharing of state
* occurs.
- *
+ *
* @since 2.4.4
*/
public DefaultDeserializationContext copy() {
@@ -137,7 +137,7 @@ public ReadableObjectId findObjectId(Object id, ObjectIdGenerator> gen, Object
* needed for {@link #tryToResolveUnresolvedObjectId}.
* Default implementation simply constructs default {@link ReadableObjectId} with
* given key
.
- *
+ *
* @param key The key to associate with the new ReadableObjectId
* @return New ReadableObjectId instance
*
@@ -196,13 +196,13 @@ protected boolean tryToResolveUnresolvedObjectId(ReadableObjectId roid)
{
return roid.tryToResolveUnresolved(this);
}
-
+
/*
/**********************************************************
/* Abstract methods impls, other factory methods
/**********************************************************
*/
-
+
@SuppressWarnings("unchecked")
@Override
public JsonDeserializer deserializerInstance(Annotated ann, Object deserDef)
@@ -212,7 +212,7 @@ public JsonDeserializer deserializerInstance(Annotated ann, Object deser
return null;
}
JsonDeserializer> deser;
-
+
if (deserDef instanceof JsonDeserializer) {
deser = (JsonDeserializer>) deserDef;
} else {
@@ -252,7 +252,7 @@ public final KeyDeserializer keyDeserializerInstance(Annotated ann, Object deser
}
KeyDeserializer deser;
-
+
if (deserDef instanceof KeyDeserializer) {
deser = (KeyDeserializer) deserDef;
} else {
@@ -295,7 +295,7 @@ public final KeyDeserializer keyDeserializerInstance(Annotated ann, Object deser
* with different factory
*/
public abstract DefaultDeserializationContext with(DeserializerFactory factory);
-
+
/**
* Method called to create actual usable per-deserialization
* context instance.
@@ -305,7 +305,7 @@ public abstract DefaultDeserializationContext createInstance(
public abstract DefaultDeserializationContext createDummyInstance(
DeserializationConfig config);
-
+
/*
/**********************************************************
/* Extended API, read methods
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 fb760a5176..9fb89692a5 100644
--- a/src/main/java/com/fasterxml/jackson/databind/deser/DeserializationProblemHandler.java
+++ b/src/main/java/com/fasterxml/jackson/databind/deser/DeserializationProblemHandler.java
@@ -39,7 +39,7 @@ public abstract class DeserializationProblemHandler
* @since 2.7
*/
public final static Object NOT_HANDLED = new Object();
-
+
/**
* Method called when a JSON Object property with an unrecognized
* name is encountered.
@@ -61,7 +61,7 @@ public abstract class DeserializationProblemHandler
* will be instantiated (if no instantiation done yet: for example
* when bean uses non-default constructors)
* @param p Parser to use for handling problematic content
- *
+ *
* @return True if the problem is resolved (and content available used or skipped);
* false if the handler did not anything and the problem is unresolved. Note that in
* latter case caller will either throw an exception or explicitly skip the content,
diff --git a/src/main/java/com/fasterxml/jackson/databind/deser/DeserializerCache.java b/src/main/java/com/fasterxml/jackson/databind/deser/DeserializerCache.java
index 69b4a2b204..1dd7c8b081 100644
--- a/src/main/java/com/fasterxml/jackson/databind/deser/DeserializerCache.java
+++ b/src/main/java/com/fasterxml/jackson/databind/deser/DeserializerCache.java
@@ -70,7 +70,7 @@ Object writeReplace() {
_incompleteDeserializers.clear();
return this;
}
-
+
/*
/**********************************************************
/* Access to caching aspects
@@ -79,7 +79,7 @@ Object writeReplace() {
/**
* Method that can be used to determine how many deserializers this
- * provider is caching currently
+ * provider is caching currently
* (if it does caching: default implementation does)
* Exact count depends on what kind of deserializers get cached;
* default implementation caches only dynamically constructed deserializers,
@@ -101,7 +101,7 @@ public int cachedDeserializersCount() {
* configuration changes for mapper than owns the provider.
*/
public void flushCachedDeserializers() {
- _cachedDeserializers.clear();
+ _cachedDeserializers.clear();
}
/*
@@ -213,7 +213,7 @@ protected JsonDeserializer _findCachedDeserializer(JavaType type)
/**
* Method that will try to create a deserializer for given type,
* and resolve and cache it if necessary
- *
+ *
* @param ctxt Currently active deserialization context
* @param type Type of property to deserialize
*/
@@ -305,7 +305,7 @@ protected JsonDeserializer _createAndCache2(DeserializationContext ctxt,
/* Helper methods for actual construction of deserializers
/**********************************************************
*/
-
+
/**
* Method that does the heavy lifting of checking for per-type annotations,
* find out full type, and figure out which actual factory method
@@ -460,7 +460,7 @@ protected Converter findConverter(DeserializationContext ctxt,
return null;
}
return ctxt.converterInstance(a, convDef);
- }
+ }
/**
* Method called to see if given method has annotations that indicate
* a more specific type than what the argument specifies.
@@ -503,7 +503,7 @@ private JavaType modifyTypeByAnnotation(DeserializationContext ctxt,
// keyType = type.getKeyType(); // just in case it's used below
}
}
- }
+ }
}
JavaType contentType = type.getContentType();
if (contentType != null) {
@@ -529,7 +529,7 @@ private JavaType modifyTypeByAnnotation(DeserializationContext ctxt,
// And after handlers, possible type refinements
// (note: could possibly avoid this if explicit deserializer was invoked?)
type = intr.refineDeserializationType(ctxt.getConfig(), a, type);
-
+
return type;
}
diff --git a/src/main/java/com/fasterxml/jackson/databind/deser/DeserializerFactory.java b/src/main/java/com/fasterxml/jackson/databind/deser/DeserializerFactory.java
index 4451fccffe..f7319ba8d8 100644
--- a/src/main/java/com/fasterxml/jackson/databind/deser/DeserializerFactory.java
+++ b/src/main/java/com/fasterxml/jackson/databind/deser/DeserializerFactory.java
@@ -10,7 +10,7 @@
* {@link JsonDeserializer} instances (which are then cached by
* context and/or dedicated cache).
*
- * Since there are multiple broad categories of deserializers, there are
+ * Since there are multiple broad categories of deserializers, there are
* multiple factory methods:
*