avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nielsbas...@apache.org
Subject avro git commit: AVRO-2080: Fix Javadoc Warnings in Generated Records This closes #254
Date Wed, 13 Dec 2017 09:53:47 GMT
Repository: avro
Updated Branches:
  refs/heads/master b8c37b322 -> b84f64023


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/b84f6402
Tree: http://git-wip-us.apache.org/repos/asf/avro/tree/b84f6402
Diff: http://git-wip-us.apache.org/repos/asf/avro/diff/b84f6402

Branch: refs/heads/master
Commit: b84f64023c4a8e61d1274fc8a3e9c26acfb15c5b
Parents: b8c37b3
Author: Bridger Howell <howellbridger@gmail.com>
Authored: Mon Oct 2 20:57:23 2017 -0600
Committer: Niels Basjes <nbasjes@bol.com>
Committed: Wed Dec 13 10:37:51 2017 +0100

----------------------------------------------------------------------
 CHANGES.txt                                          |  3 +++
 .../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, 42 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/avro/blob/b84f6402/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 9af445f..1d22b4d 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -93,6 +93,9 @@ Trunk (not yet released)
     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-1741: Python3: Fix error when codec is not in the header.

http://git-wip-us.apache.org/repos/asf/avro/blob/b84f6402/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 b38fbd0..1e314f3 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/b84f6402/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 a12a214..55fabe0 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/b84f6402/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 aa78034..53ac1af 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);


Mime
View raw message