From 27b04f811e07e7447478214b4eaa2a2a4014718a Mon Sep 17 00:00:00 2001 From: Tatu Saloranta Date: Sat, 25 Apr 2020 19:11:10 -0700 Subject: [PATCH] Javadoc warning fixes --- .../jackson/dataformat/avro/AvroFactory.java | 2 +- .../jackson/dataformat/cbor/CBORParser.java | 2 +- .../IonAnnotationIntrospector.java | 13 +++++------ .../IonAnnotationTypeDeserializer.java | 2 +- .../IonAnnotationTypeResolverBuilder.java | 2 +- .../polymorphism/MultipleTypeIdResolver.java | 22 +++++++++---------- pom.xml | 3 +-- .../dataformat/protobuf/ProtobufFactory.java | 2 +- release-notes/VERSION-2.x | 2 +- .../dataformat/smile/SmileConstants.java | 2 +- .../dataformat/smile/SmileParserBase.java | 2 +- 11 files changed, 26 insertions(+), 28 deletions(-) diff --git a/avro/src/main/java/com/fasterxml/jackson/dataformat/avro/AvroFactory.java b/avro/src/main/java/com/fasterxml/jackson/dataformat/avro/AvroFactory.java index 93e3925cc..c30b823df 100644 --- a/avro/src/main/java/com/fasterxml/jackson/dataformat/avro/AvroFactory.java +++ b/avro/src/main/java/com/fasterxml/jackson/dataformat/avro/AvroFactory.java @@ -102,7 +102,7 @@ protected AvroFactory(AvroFactory src, ObjectCodec oc) } /** - * Constructors used by {@link YAMLFactoryBuilder} for instantiation. + * Constructors used by {@link AvroFactoryBuilder} for instantiation. * * @since 2.9 */ diff --git a/cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java b/cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java index 35751c230..8d3252d97 100644 --- a/cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java +++ b/cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java @@ -910,7 +910,7 @@ protected JsonToken _handleTaggedArray(int tag, int len) throws IOException } /** - * Heavily simplified method that does a subset of what {@code nextTokendoes to basically + * Heavily simplified method that does a subset of what {@code nextToken()} does to basically * only (1) determine that we are getting {@code JsonToken.VALUE_NUMBER_INT} (if not, * return with no processing) and (2) if so, prepare state so that number accessor * method will work). diff --git a/ion/src/main/java/com/fasterxml/jackson/dataformat/ion/polymorphism/IonAnnotationIntrospector.java b/ion/src/main/java/com/fasterxml/jackson/dataformat/ion/polymorphism/IonAnnotationIntrospector.java index 14e823504..011ec545d 100644 --- a/ion/src/main/java/com/fasterxml/jackson/dataformat/ion/polymorphism/IonAnnotationIntrospector.java +++ b/ion/src/main/java/com/fasterxml/jackson/dataformat/ion/polymorphism/IonAnnotationIntrospector.java @@ -27,20 +27,19 @@ * A Jackson {@link com.fasterxml.jackson.databind.AnnotationIntrospector} (essentially an interceptor for * serializer/deserializer construction) that provides type serializer/deserializers that write/read Ion type * annotations. - *

+ *

* The logic in this class is very similar to {@link com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector}! * We both look at the @JsonTypeResolver, etc annotations and try to make type resolvers. - *

+ *

* This class adds a {@code resolveAllTypes} override, which allows for universal polymorphism without needing * any annotations or mixins, and also permits top-level polymorphism -- deserialize to any object without providing its * actual type, as long as type information was serialized. (i.e., ObjectMapper#readValue(serializedData, Object.class)) - *

+ *

* Note: the provided {@link com.fasterxml.jackson.databind.jsontype.TypeSerializer} will only write type annotations if the configured * {@link TypeIdResolver} returns non-null. - *

+ *

* Note: {@link com.fasterxml.jackson.databind.jsontype.TypeDeserializer} are actually full-on value deserializers -- all * deserialization logic goes through them (unlike TypeSerializers, which just write the type metadata). - *

*/ public class IonAnnotationIntrospector extends NopAnnotationIntrospector { private static final long serialVersionUID = 1L; @@ -63,10 +62,10 @@ protected boolean shouldResolveType(AnnotatedClass ac) { /** * Provides a {@link TypeResolverBuilder} if the {@link AnnotatedClass} is enabled for type resolving, and a * {@link TypeIdResolver} can be instantiated. - *

+ *

* The AnnotatedClass is enabled for type resolving if either {@code resolveAllTypes} is set, or shouldResolveType() * returns true. - *

+ *

* We look for a TypeIdResolver by checking for a {@link JsonTypeIdResolver} annotation, and fallback to * {@code defaultIdResolver()}. * diff --git a/ion/src/main/java/com/fasterxml/jackson/dataformat/ion/polymorphism/IonAnnotationTypeDeserializer.java b/ion/src/main/java/com/fasterxml/jackson/dataformat/ion/polymorphism/IonAnnotationTypeDeserializer.java index d45511b8c..5925bd425 100644 --- a/ion/src/main/java/com/fasterxml/jackson/dataformat/ion/polymorphism/IonAnnotationTypeDeserializer.java +++ b/ion/src/main/java/com/fasterxml/jackson/dataformat/ion/polymorphism/IonAnnotationTypeDeserializer.java @@ -33,7 +33,7 @@ * This is a {@link com.fasterxml.jackson.databind.jsontype.TypeDeserializer} that reads typing metadata from Ion type * annotations. Annotations found are processed by the configured {@link TypeIdResolver} to provide a concrete Java * class, which is in turn used to find the appropriate {@link JsonDeserializer}, and execute it. - *

+ *

* If multiple annotations are found, the first annotation to resolve to a non-null {@link JavaType} using the * configured {@link TypeIdResolver} is used. Ion provides type annotations in alphabetic order. * diff --git a/ion/src/main/java/com/fasterxml/jackson/dataformat/ion/polymorphism/IonAnnotationTypeResolverBuilder.java b/ion/src/main/java/com/fasterxml/jackson/dataformat/ion/polymorphism/IonAnnotationTypeResolverBuilder.java index 3f6414767..e4c4d2b5e 100644 --- a/ion/src/main/java/com/fasterxml/jackson/dataformat/ion/polymorphism/IonAnnotationTypeResolverBuilder.java +++ b/ion/src/main/java/com/fasterxml/jackson/dataformat/ion/polymorphism/IonAnnotationTypeResolverBuilder.java @@ -29,7 +29,7 @@ /** * A {@link TypeResolverBuilder} which produces {@link TypeSerializer}s and {@link TypeDeserializer}s that use * Ion type annotations to communicate type metadata. Jackson polymorphism, the Ion way. - * + *

* This TypeResolverBuilder expects to be initialized with a functional {@link TypeIdResolver}, and will serialize * type information (and deserialize to something other than the default type) when it resolves the provided * {@link JavaType} to a non-null type identifier, and vice versa. diff --git a/ion/src/main/java/com/fasterxml/jackson/dataformat/ion/polymorphism/MultipleTypeIdResolver.java b/ion/src/main/java/com/fasterxml/jackson/dataformat/ion/polymorphism/MultipleTypeIdResolver.java index 879807a16..8575a1d85 100644 --- a/ion/src/main/java/com/fasterxml/jackson/dataformat/ion/polymorphism/MultipleTypeIdResolver.java +++ b/ion/src/main/java/com/fasterxml/jackson/dataformat/ion/polymorphism/MultipleTypeIdResolver.java @@ -20,11 +20,11 @@ * This is an extension of {@link TypeIdResolver} for serializing and deserializing polymorphic types. The vanilla * implementation of TypeIdResolver only enables a single type id to be serialized with a value, which is not always * sufficient for every consumer of a value with polymorphic typing to identify and instantiate the appropriate type. - *

+ *

* This allows more robust polymorphism support, in that consumers of a serialized polymorphic object do not need * complete type information. As long as their deserializer can resolve (or, understand) one of the annotated type ids, * they can still perform polymorphic deserialization. An example: - *

+ *

*

  * class BasicMessage {
  *      String id;
@@ -33,22 +33,22 @@
  * class SocialMediaMessage extends BasicMessage {
  *      boolean cool;
  * }
- *
+ *
* Let's say we serialized a value into: - * + *
  *      {id="123",message="hi",cool=false}.
- *
+ *
* The existing polymorphism support may have annotated this as the following Ion: - * + *
  *      SocialMediaMessage::{id="123",message="hi",cool=false}
- *
+ *
* But a consumer who only has BasicMessage in its classloader won't know (or care) what a SocialMediaMessage is, and be * stuck. Using this interface enables the following serialization: - * + *
  *      SocialMediaMessage::BasicMessage::{id="123",message="hi",cool=false}
- *
+ *
* About particular implementations: - *

+ *

* Ion serialization should be using {@link IonAnnotationTypeSerializer}, which is polymorphism-aware, but how should a * MultipleTypeIdResolver handle a call to the non-polymorphic {@link TypeIdResolver#idFromValue(Object)}? I'd probably * do something like {@code return selectId(idsFromValue(value)); }, to keep things working when serializing @@ -72,7 +72,7 @@ public interface MultipleTypeIdResolver extends TypeIdResolver { * {@link TypeIdResolver#typeFromId} to get a {@link com.fasterxml.jackson.databind.JavaType}. It is a invariant * on this method that its output, if non-null, be valid input for {@link TypeIdResolver#typeFromId} of the * same TypeIdResolver instance. - *

+ *

* Note that we're not resolving the array of ids directly into a JavaType because there is code (in the Jackson * package, not ours) which consumes the id String itself, not the JavaType object. * diff --git a/pom.xml b/pom.xml index 2c51e98b2..69b4bd52a 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ com.fasterxml.jackson jackson-base - 2.11.0-SNAPSHOT + 2.11.0 com.fasterxml.jackson.dataformat jackson-dataformats-binary @@ -34,7 +34,6 @@ UTF-8 - 6.2.1 diff --git a/protobuf/src/main/java/com/fasterxml/jackson/dataformat/protobuf/ProtobufFactory.java b/protobuf/src/main/java/com/fasterxml/jackson/dataformat/protobuf/ProtobufFactory.java index 2ad0df1df..9c4179fc4 100644 --- a/protobuf/src/main/java/com/fasterxml/jackson/dataformat/protobuf/ProtobufFactory.java +++ b/protobuf/src/main/java/com/fasterxml/jackson/dataformat/protobuf/ProtobufFactory.java @@ -31,7 +31,7 @@ protected ProtobufFactory(ProtobufFactory src, ObjectCodec oc) } /** - * Constructors used by {@link CBORFactoryBuilder} for instantiation. + * Constructors used by {@link ProtobufFactoryBuilder} for instantiation. * * @since 2.9 */ diff --git a/release-notes/VERSION-2.x b/release-notes/VERSION-2.x index 8be183732..5d3ce9790 100644 --- a/release-notes/VERSION-2.x +++ b/release-notes/VERSION-2.x @@ -8,7 +8,7 @@ Project: jackson-datatypes-binaryModules: === Releases === ------------------------------------------------------------------------ -2.11.0 (not yet released) +2.11.0 (26-Apr-2020) #179: (avro) Add `AvroGenerator.canWriteBinaryNatively()` to support binary writes, fix `java.util.UUID` representation diff --git a/smile/src/main/java/com/fasterxml/jackson/dataformat/smile/SmileConstants.java b/smile/src/main/java/com/fasterxml/jackson/dataformat/smile/SmileConstants.java index 19d893ddc..4952ada28 100644 --- a/smile/src/main/java/com/fasterxml/jackson/dataformat/smile/SmileConstants.java +++ b/smile/src/main/java/com/fasterxml/jackson/dataformat/smile/SmileConstants.java @@ -45,7 +45,7 @@ public final class SmileConstants /** * Longest back reference we use for short shared String values is 10 bits, - * so up to (1 << 10) values to keep track of. + * so up to {@code (1 << 10)} values to keep track of. */ public final static int MAX_SHARED_STRING_VALUES = 1024; diff --git a/smile/src/main/java/com/fasterxml/jackson/dataformat/smile/SmileParserBase.java b/smile/src/main/java/com/fasterxml/jackson/dataformat/smile/SmileParserBase.java index b96523e71..8e852cdf6 100644 --- a/smile/src/main/java/com/fasterxml/jackson/dataformat/smile/SmileParserBase.java +++ b/smile/src/main/java/com/fasterxml/jackson/dataformat/smile/SmileParserBase.java @@ -96,7 +96,7 @@ public abstract class SmileParserBase extends ParserMinimalBase protected long _currInputProcessed; /** - * Alternative to {@link #_tokenInputTotal} that will only contain + * Alternative to {@code _tokenInputTotal} that will only contain * offset within input buffer, as int. */ protected int _tokenOffsetForTotal;