Skip to content

Commit

Permalink
Javadoc warning fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Apr 26, 2020
1 parent 4c1db5e commit 27b04f8
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 28 deletions.
Expand Up @@ -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
*/
Expand Down
Expand Up @@ -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).
Expand Down
Expand Up @@ -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.
* <p/>
* <p>
* 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.
* <p/>
* <p>
* 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))
* <p/>
* <p>
* Note: the provided {@link com.fasterxml.jackson.databind.jsontype.TypeSerializer} will only write type annotations if the configured
* {@link TypeIdResolver} returns non-null.
* <p/>
* <p>
* 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).
* <p/>
*/
public class IonAnnotationIntrospector extends NopAnnotationIntrospector {
private static final long serialVersionUID = 1L;
Expand All @@ -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.
* <p/>
* <p>
* The AnnotatedClass is enabled for type resolving if either {@code resolveAllTypes} is set, or shouldResolveType()
* returns true.
* <p/>
* <p>
* We look for a TypeIdResolver by checking for a {@link JsonTypeIdResolver} annotation, and fallback to
* {@code defaultIdResolver()}.
*
Expand Down
Expand Up @@ -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.
* <p/>
* <p>
* 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.
*
Expand Down
Expand Up @@ -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.
*
*<p>
* 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.
Expand Down
Expand Up @@ -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.
* <p/>
* <p>
* 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:
* <p/>
* <p>
* <pre>
* class BasicMessage {
* String id;
Expand All @@ -33,22 +33,22 @@
* class SocialMediaMessage extends BasicMessage {
* boolean cool;
* }
*
*</pre>
* Let's say we serialized a value into:
*
*<pre>
* {id="123",message="hi",cool=false}.
*
*</pre>
* The existing polymorphism support may have annotated this as the following Ion:
*
*<pre>
* SocialMediaMessage::{id="123",message="hi",cool=false}
*
*</pre>
* 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:
*
*<pre>
* SocialMediaMessage::BasicMessage::{id="123",message="hi",cool=false}
*
*</pre>
* About particular implementations:
* <p/>
* <p>
* 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
Expand All @@ -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.
* <p/>
* <p>
* 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.
*
Expand Down
3 changes: 1 addition & 2 deletions pom.xml
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>com.fasterxml.jackson</groupId>
<artifactId>jackson-base</artifactId>
<version>2.11.0-SNAPSHOT</version>
<version>2.11.0</version>
</parent>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformats-binary</artifactId>
Expand Down Expand Up @@ -34,7 +34,6 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<version.asm>6.2.1</version.asm>
</properties>

<dependencies>
Expand Down
Expand Up @@ -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
*/
Expand Down
2 changes: 1 addition & 1 deletion release-notes/VERSION-2.x
Expand Up @@ -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
Expand Down
Expand Up @@ -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;

Expand Down
Expand Up @@ -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;
Expand Down

0 comments on commit 27b04f8

Please sign in to comment.