Skip to content

Commit df541d3

Browse files
authored
Improve and fix JavaDocs for Jackson 2.15 (#3917)
1 parent c8c7d39 commit df541d3

File tree

9 files changed

+23
-23
lines changed

9 files changed

+23
-23
lines changed

src/main/java/com/fasterxml/jackson/databind/AnnotationIntrospector.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@ public enum Type {
5959
* Usually this can be defined by using
6060
* {@link com.fasterxml.jackson.annotation.JsonManagedReference}
6161
*/
62-
MANAGED_REFERENCE
62+
MANAGED_REFERENCE,
6363

6464
/**
6565
* Reference property that Jackson manages by suppressing it during serialization,
6666
* and reconstructing during deserialization.
6767
* Usually this can be defined by using
6868
* {@link com.fasterxml.jackson.annotation.JsonBackReference}
6969
*/
70-
,BACK_REFERENCE
70+
BACK_REFERENCE
7171
;
7272
}
7373

src/main/java/com/fasterxml/jackson/databind/MapperFeature.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ public enum MapperFeature implements ConfigFeature
322322
* Feature is enabled by default which means that deserialization does
323323
* support deserializing types via builders with type parameters (generic types).
324324
*<p>
325-
* See: https://github.com/FasterXML/jackson-databind/issues/921
325+
* See: <a href="https://github.com/FasterXML/jackson-databind/issues/921">databind#921</a>
326326
*
327327
* @since 2.12
328328
*/
@@ -401,6 +401,11 @@ public enum MapperFeature implements ConfigFeature
401401
*<p>
402402
* Note: does <b>not</b> apply to {@link java.util.Map} serialization (since
403403
* entries are not considered Bean/POJO properties.
404+
* <p>
405+
* WARNING: Disabling it may have a negative impact on deserialization performance.
406+
* When disabled, all properties before the last creator property in the input need to be buffered,
407+
* since all creator properties are required to create the instance.
408+
* Enabling this feature ensures that there is as little buffering as possible.
404409
*<p>
405410
* Feature is enabled by default.
406411
*

src/main/java/com/fasterxml/jackson/databind/ObjectMapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4623,7 +4623,7 @@ public <T> T updateValue(T valueToUpdate, Object overrides)
46234623
* @param t The class to generate schema for
46244624
* @return Constructed JSON schema.
46254625
*
4626-
* @deprecated Since 2.6 use external JSON Schema generator (https://github.com/FasterXML/jackson-module-jsonSchema)
4626+
* @deprecated Since 2.6 use external JSON Schema generator (<a href="https://github.com/FasterXML/jackson-module-jsonSchema">jackson-module-jsonSchema</a>)
46274627
* (which under the hood calls {@link #acceptJsonFormatVisitor(JavaType, JsonFormatVisitorWrapper)})
46284628
*/
46294629
@Deprecated

src/main/java/com/fasterxml/jackson/databind/SerializerProvider.java

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -947,19 +947,15 @@ public JsonSerializer<Object> getDefaultNullValueSerializer() {
947947
}
948948

949949
/**
950-
* Method called to get the serializer to use for serializing
951-
* Map keys that are nulls: this is needed since JSON does not allow
952-
* any non-String value as key, including null.
953-
*<p>
954-
* Typically, returned serializer
955-
* will either throw an exception, or use an empty String; but
956-
* other behaviors are possible.
957-
*/
958-
/**
959-
* Method called to find a serializer to use for null values for given
960-
* declared type. Note that type is completely based on declared type,
950+
* Method called to find a serializer to serializes Map keys that are nulls,
951+
* as JSON does not allow any non-String value as a key, including null.
952+
* Note that type is completely based on declared type,
961953
* since nulls in Java have no type and thus runtime type cannot be
962954
* determined.
955+
*
956+
* @return JsonSerializer that handles the serialization of null keys,
957+
* usually by throwing an exception or using an empty String,
958+
* but other behaviors are also possible.
963959
*
964960
* @since 2.0
965961
*/

src/main/java/com/fasterxml/jackson/databind/deser/std/CollectionDeserializer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -529,8 +529,8 @@ public void resolveForwardReference(Object id, Object value) throws IOException
529529

530530
/**
531531
* Helper class to maintain processing order of value. The resolved
532-
* object associated with {@link #_id} comes before the values in
533-
* {@link #next}.
532+
* object associated with {@code #id} parameter from {@link #handleResolvedForwardReference(Object, Object)}
533+
* comes before the values in {@link #next}.
534534
*/
535535
private final static class CollectionReferring extends Referring {
536536
private final CollectionReferringAccumulator _parent;

src/main/java/com/fasterxml/jackson/databind/introspect/AnnotatedClass.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,7 @@ public static AnnotatedClass construct(JavaType type, MapperConfig<?> config,
202202
* Method similar to {@link #construct}, but that will NOT include
203203
* information from supertypes; only class itself and any direct
204204
* mix-ins it may have.
205-
*/
206-
/**
205+
*
207206
* @deprecated Since 2.9, use methods in {@link AnnotatedClassResolver} instead.
208207
*/
209208
@Deprecated

src/main/java/com/fasterxml/jackson/databind/util/internal/PrivateMaxEntriesMap.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public final class PrivateMaxEntriesMap<K, V> extends AbstractMap<K, V>
136136

137137
/**
138138
* The number of read buffers to use.
139-
* The max of 4 was introduced due to https://github.com/FasterXML/jackson-databind/issues/3665.
139+
* The max of 4 was introduced due to <a href="https://github.com/FasterXML/jackson-databind/issues/3665">databind#3665</a>.
140140
*/
141141
static final int NUMBER_OF_READ_BUFFERS = Math.min(4, ceilingNextPowerOfTwo(NCPU));
142142

@@ -145,7 +145,7 @@ public final class PrivateMaxEntriesMap<K, V> extends AbstractMap<K, V>
145145

146146
/**
147147
* The number of pending read operations before attempting to drain.
148-
* The threshold of 4 was introduced due to https://github.com/FasterXML/jackson-databind/issues/3665.
148+
* The threshold of 4 was introduced due to <a href="https://github.com/FasterXML/jackson-databind/issues/3665">databind#3665</a>.
149149
*/
150150
static final int READ_BUFFER_THRESHOLD = 4;
151151

src/test/java/com/fasterxml/jackson/databind/deser/dos/StreamReadStringConstraintsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import com.fasterxml.jackson.databind.json.JsonMapper;
1010

1111
/**
12-
* Tests for {@a href="https://github.com/FasterXML/jackson-core/issues/863"}.
12+
* Tests for <a href="https://github.com/FasterXML/jackson-core/issues/863">databind#863</a>"
1313
*/
1414
public class StreamReadStringConstraintsTest extends BaseMapTest
1515
{

src/test/java/com/fasterxml/jackson/databind/jsontype/TestPolymorphicDeserialization676.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import java.util.*;
99

1010
/**
11-
* Reproduction of [https://github.com/FasterXML/jackson-databind/issues/676]
11+
* Reproduction of <a href="https://github.com/FasterXML/jackson-databind/issues/676">databind#676</a>
1212
* <p/>
1313
* Deserialization of class with generic collection inside
1414
* depends on how is was deserialized first time.

0 commit comments

Comments
 (0)