Skip to content

Commit 7ccc1de

Browse files
authored
Fix ObjectWriter's Javadoc (#5468)
1 parent 7ccfc9e commit 7ccc1de

File tree

3 files changed

+16
-19
lines changed

3 files changed

+16
-19
lines changed

src/main/java/tools/jackson/databind/ObjectMapper.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,7 @@ protected Object readResolve() {
186186
*/
187187

188188
/**
189-
* Factory used for constructing per-call {@link SerializationContext}s.
190-
*<p>
191-
* Note: while serializers are only exposed {@link SerializationContext},
192-
* mappers and readers need to access additional API defined by
193-
* {@link SerializationContextExt}
189+
* Factory used for constructing per-call {@link SerializationContext} instances.
194190
*/
195191
protected final SerializationContexts _serializationContexts;
196192

@@ -207,7 +203,7 @@ protected Object readResolve() {
207203
*/
208204

209205
/**
210-
* Factory used for constructing per-call {@link DeserializationContext}s.
206+
* Factory used for constructing per-call {@link DeserializationContext} instances.
211207
*/
212208
protected final DeserializationContexts _deserializationContexts;
213209

src/main/java/tools/jackson/databind/ObjectWriter.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public class ObjectWriter
5454
* Factory used for constructing per-call {@link SerializationContext}s.
5555
*<p>
5656
* Note: while serializers are only exposed {@link SerializationContext},
57-
* mappers and readers need to access additional API defined by
57+
* writers need to access additional API defined by
5858
* {@link SerializationContextExt}
5959
*/
6060
protected final SerializationContexts _serializationContexts;
@@ -80,7 +80,7 @@ public class ObjectWriter
8080
* We may pre-fetch serializer if root type
8181
* is known (has been explicitly declared), and if so, reuse it afterwards.
8282
* This allows avoiding further serializer lookups and increases
83-
* performance a bit on cases where readers are reused.
83+
* performance a bit on cases where writers are reused.
8484
*/
8585
protected final Prefetch _prefetch;
8686

@@ -367,7 +367,7 @@ public ObjectWriter withoutFeatures(FormatFeature... features) {
367367
* as the root type for serialization, instead of runtime dynamic
368368
* type of the root object itself.
369369
*<p>
370-
* Note that method does NOT change state of this reader, but
370+
* Note that the method does NOT change the state of this writer, but
371371
* rather construct and returns a newly configured instance.
372372
*/
373373
public ObjectWriter forType(JavaType rootType) {
@@ -403,7 +403,7 @@ public ObjectWriter forType(TypeReference<?> rootType) {
403403
* use specified date format for serializing dates; or if null passed, one
404404
* that will serialize dates as numeric timestamps.
405405
*<p>
406-
* Note that the method does NOT change state of this reader, but
406+
* Note that the method does NOT change the state of this writer, but
407407
* rather construct and returns a newly configured instance.
408408
*/
409409
public ObjectWriter with(DateFormat df) {
@@ -442,7 +442,7 @@ public ObjectWriter with(PrettyPrinter pp) {
442442
* specifies what root name to use for "root element wrapping".
443443
* See {@link SerializationConfig#withRootName(String)} for details.
444444
*<p>
445-
* Note that method does NOT change state of this reader, but
445+
* Note that the method does NOT change the state of this writer, but
446446
* rather construct and returns a newly configured instance.
447447
*
448448
* @param rootName Root name to use, if non-empty; `null` for "use defaults",
@@ -472,7 +472,7 @@ public ObjectWriter withoutRootName() {
472472
* Method that will construct a new instance that uses specific format schema
473473
* for serialization.
474474
*<p>
475-
* Note that method does NOT change state of this reader, but
475+
* Note that the method does NOT change the state of this writer, but
476476
* rather construct and returns a newly configured instance.
477477
*/
478478
public ObjectWriter with(FormatSchema schema) {
@@ -485,7 +485,7 @@ public ObjectWriter with(FormatSchema schema) {
485485
* serialization view for serialization (with null basically disables
486486
* view processing)
487487
*<p>
488-
* Note that the method does NOT change state of this reader, but
488+
* Note that the method does NOT change the state of this writer, but
489489
* rather construct and returns a newly configured instance.
490490
*/
491491
public ObjectWriter withView(Class<?> view) {
@@ -1279,7 +1279,7 @@ public final static class Prefetch
12791279
* We may pre-fetch serializer if {@link #rootType}
12801280
* is known, and if so, reuse it afterwards.
12811281
* This allows avoiding further serializer lookups and increases
1282-
* performance a bit on cases where readers are reused.
1282+
* performance a bit on cases where writers are reused.
12831283
*/
12841284
private final ValueSerializer<Object> valueSerializer;
12851285

src/main/java/tools/jackson/databind/cfg/SerializationContexts.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@
1010

1111
/**
1212
* Factory/builder class that replaces Jackson 2.x concept of "blueprint" instance
13-
* of {@link tools.jackson.databind.SerializationContext}. It will be constructed and configured during
14-
* {@link ObjectMapper} building phase, and will be called once per {@code writeValue}
15-
* call to construct actual stateful {@link tools.jackson.databind.SerializationContext} to use during
16-
* serialization.
13+
* of {@link tools.jackson.databind.SerializationContext}. It will be constructed
14+
* and configured during {@link ObjectMapper} building phase,
15+
* and will be called once per {@code writeValue} call to construct actual stateful
16+
* {@link tools.jackson.databind.SerializationContext} to use during serialization.
1717
*<p>
1818
* Note that since this object has to be serializable (to allow JDK serialization of
19-
* mapper instances), {@link tools.jackson.databind.SerializationContext} need not be serializable any more.
19+
* mapper instances), {@link tools.jackson.databind.SerializationContext}
20+
* need not be serializable any more.
2021
*
2122
* @since 3.0
2223
*/

0 commit comments

Comments
 (0)