Repository: avro
Updated Branches:
  refs/heads/branch-1.8 5d3588c42 -> 786a29234


AVRO-2080: Fix Javadoc Warnings in Generated Records
This closes #254


Project: http://git-wip-us.apache.org/repos/asf/avro/repo
Commit: http://git-wip-us.apache.org/repos/asf/avro/commit/786a2923
Tree: http://git-wip-us.apache.org/repos/asf/avro/tree/786a2923
Diff: http://git-wip-us.apache.org/repos/asf/avro/diff/786a2923

Branch: refs/heads/branch-1.8
Commit: 786a29234a2540cfffa2b11aea91f0c9667ff372
Parents: 5d3588c
Author: Bridger Howell <[email protected]>
Authored: Mon Oct 2 20:57:23 2017 -0600
Committer: Niels Basjes <[email protected]>
Committed: Wed Dec 13 10:48:52 2017 +0100

----------------------------------------------------------------------
 CHANGES.txt                                          |  9 ++++++---
 .../specific/templates/java/classic/record.vm        | 15 +++++++++++++--
 .../output-string/avro/examples/baseball/Player.java | 15 +++++++++++++--
 lang/java/tools/src/test/compiler/output/Player.java | 15 +++++++++++++--
 4 files changed, 45 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/avro/blob/786a2923/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index db74d16..f8eefc4 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -10,6 +10,12 @@ Trunk (not yet released)
 
     AVRO-2021: uuid logical type is not documented (Nandor Kollar via gabor)
 
+    AVRO-1047: Remaining warnings in generated Java code exposed by -Xlint:all 
fixed.
+    (Michael Werle via Niels Basjes)
+
+    AVRO-2080: Fix Javadoc Warnings in Generated Records
+    (Bridger Howell via Niels Basjes)
+
   BUG FIXES
 
     AVRO-1401: @Nullable does not work with byte[] (Nandor Kollar via gabor)
@@ -17,9 +23,6 @@ Trunk (not yet released)
     AVRO-1485: Specification says Record field type can be record name but 
implementation allows any named type.
     (Nandor Kollar via gabor)
 
-    AVRO-1047: Remaining warnings in generated Java code exposed by -Xlint:all 
fixed.
-    (Michael Werle via Niels Basjes)
-
 Avro 1.8.2 (10 April 2017)
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/avro/blob/786a2923/lang/java/compiler/src/main/velocity/org/apache/avro/compiler/specific/templates/java/classic/record.vm
----------------------------------------------------------------------
diff --git 
a/lang/java/compiler/src/main/velocity/org/apache/avro/compiler/specific/templates/java/classic/record.vm
 
b/lang/java/compiler/src/main/velocity/org/apache/avro/compiler/specific/templates/java/classic/record.vm
index f4fd659..f55c1ff 100644
--- 
a/lang/java/compiler/src/main/velocity/org/apache/avro/compiler/specific/templates/java/classic/record.vm
+++ 
b/lang/java/compiler/src/main/velocity/org/apache/avro/compiler/specific/templates/java/classic/record.vm
@@ -49,6 +49,7 @@ public class ${this.mangle($schema.getName())}#if 
($schema.isError()) extends or
 
   /**
    * Return the BinaryMessageDecoder instance used by this class.
+   * @return the message decoder used by this class
    */
   public static BinaryMessageDecoder<${this.mangle($schema.getName())}> 
getDecoder() {
     return DECODER;
@@ -57,17 +58,27 @@ public class ${this.mangle($schema.getName())}#if 
($schema.isError()) extends or
   /**
    * Create a new BinaryMessageDecoder instance for this class that uses the 
specified {@link SchemaStore}.
    * @param resolver a {@link SchemaStore} used to find schemas by fingerprint
+   * @return a BinaryMessageDecoder instance for this class backed by the 
given SchemaStore
    */
   public static BinaryMessageDecoder<${this.mangle($schema.getName())}> 
createDecoder(SchemaStore resolver) {
     return new BinaryMessageDecoder<${this.mangle($schema.getName())}>(MODEL$, 
SCHEMA$, resolver);
   }
 
-  /** Serializes this ${schema.getName()} to a ByteBuffer. */
+  /**
+   * Serializes this ${schema.getName()} to a ByteBuffer.
+   * @return a buffer holding the serialized data for this instance
+   * @throws java.io.IOException if this instance could not be serialized
+   */
   public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {
     return ENCODER.encode(this);
   }
 
-  /** Deserializes a ${schema.getName()} from a ByteBuffer. */
+  /**
+   * Deserializes a ${schema.getName()} from a ByteBuffer.
+   * @param b a byte buffer holding serialized data for an instance of this 
class
+   * @return a ${schema.getName()} instance decoded from the given buffer
+   * @throws java.io.IOException if the given bytes could not be deserialized 
into an instance of this class
+   */
   public static ${this.mangle($schema.getName())} fromByteBuffer(
       java.nio.ByteBuffer b) throws java.io.IOException {
     return DECODER.decode(b);

http://git-wip-us.apache.org/repos/asf/avro/blob/786a2923/lang/java/tools/src/test/compiler/output-string/avro/examples/baseball/Player.java
----------------------------------------------------------------------
diff --git 
a/lang/java/tools/src/test/compiler/output-string/avro/examples/baseball/Player.java
 
b/lang/java/tools/src/test/compiler/output-string/avro/examples/baseball/Player.java
index 156b0e7..e534c2f 100644
--- 
a/lang/java/tools/src/test/compiler/output-string/avro/examples/baseball/Player.java
+++ 
b/lang/java/tools/src/test/compiler/output-string/avro/examples/baseball/Player.java
@@ -27,6 +27,7 @@ public class Player extends 
org.apache.avro.specific.SpecificRecordBase implemen
 
   /**
    * Return the BinaryMessageDecoder instance used by this class.
+   * @return the message decoder used by this class
    */
   public static BinaryMessageDecoder<Player> getDecoder() {
     return DECODER;
@@ -35,17 +36,27 @@ public class Player extends 
org.apache.avro.specific.SpecificRecordBase implemen
   /**
    * Create a new BinaryMessageDecoder instance for this class that uses the 
specified {@link SchemaStore}.
    * @param resolver a {@link SchemaStore} used to find schemas by fingerprint
+   * @return a BinaryMessageDecoder instance for this class backed by the 
given SchemaStore
    */
   public static BinaryMessageDecoder<Player> createDecoder(SchemaStore 
resolver) {
     return new BinaryMessageDecoder<Player>(MODEL$, SCHEMA$, resolver);
   }
 
-  /** Serializes this Player to a ByteBuffer. */
+  /**
+   * Serializes this Player to a ByteBuffer.
+   * @return a buffer holding the serialized data for this instance
+   * @throws java.io.IOException if this instance could not be serialized
+   */
   public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {
     return ENCODER.encode(this);
   }
 
-  /** Deserializes a Player from a ByteBuffer. */
+  /**
+   * Deserializes a Player from a ByteBuffer.
+   * @param b a byte buffer holding serialized data for an instance of this 
class
+   * @return a Player instance decoded from the given buffer
+   * @throws java.io.IOException if the given bytes could not be deserialized 
into an instance of this class
+   */
   public static Player fromByteBuffer(
       java.nio.ByteBuffer b) throws java.io.IOException {
     return DECODER.decode(b);

http://git-wip-us.apache.org/repos/asf/avro/blob/786a2923/lang/java/tools/src/test/compiler/output/Player.java
----------------------------------------------------------------------
diff --git a/lang/java/tools/src/test/compiler/output/Player.java 
b/lang/java/tools/src/test/compiler/output/Player.java
index 94ab546..382c067 100644
--- a/lang/java/tools/src/test/compiler/output/Player.java
+++ b/lang/java/tools/src/test/compiler/output/Player.java
@@ -27,6 +27,7 @@ public class Player extends 
org.apache.avro.specific.SpecificRecordBase implemen
 
   /**
    * Return the BinaryMessageDecoder instance used by this class.
+   * @return the message decoder used by this class
    */
   public static BinaryMessageDecoder<Player> getDecoder() {
     return DECODER;
@@ -35,17 +36,27 @@ public class Player extends 
org.apache.avro.specific.SpecificRecordBase implemen
   /**
    * Create a new BinaryMessageDecoder instance for this class that uses the 
specified {@link SchemaStore}.
    * @param resolver a {@link SchemaStore} used to find schemas by fingerprint
+   * @return a BinaryMessageDecoder instance for this class backed by the 
given SchemaStore
    */
   public static BinaryMessageDecoder<Player> createDecoder(SchemaStore 
resolver) {
     return new BinaryMessageDecoder<Player>(MODEL$, SCHEMA$, resolver);
   }
 
-  /** Serializes this Player to a ByteBuffer. */
+  /**
+   * Serializes this Player to a ByteBuffer.
+   * @return a buffer holding the serialized data for this instance
+   * @throws java.io.IOException if this instance could not be serialized
+   */
   public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {
     return ENCODER.encode(this);
   }
 
-  /** Deserializes a Player from a ByteBuffer. */
+  /**
+   * Deserializes a Player from a ByteBuffer.
+   * @param b a byte buffer holding serialized data for an instance of this 
class
+   * @return a Player instance decoded from the given buffer
+   * @throws java.io.IOException if the given bytes could not be deserialized 
into an instance of this class
+   */
   public static Player fromByteBuffer(
       java.nio.ByteBuffer b) throws java.io.IOException {
     return DECODER.decode(b);

Reply via email to