avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bus...@apache.org
Subject avro git commit: AVRO-1988 Make 1.7 branch actually build. Contributed by Radai Rosenblatt.
Date Sat, 28 Jan 2017 05:50:40 GMT
Repository: avro
Updated Branches:
  refs/heads/branch-1.7 a0506d472 -> 49f3bf03d


AVRO-1988 Make 1.7 branch actually build. Contributed by Radai Rosenblatt.

Seems like AVRO-1681 was only partially applied to the 1.7 branch. Specifically, the expected
test output was not updated to reflect changes in javadoc.
This commit fixes the tests and makes the build pass

Also ignores IDEA files.

Closes #139.

Signed-off-by: Suraj Acharya <suraj.spa@gmail.com>
Signed-off-by: Sean Busbey <busbey@apache.org>


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

Branch: refs/heads/branch-1.7
Commit: 49f3bf03df80c74c82416618639efbc81f81b7a0
Parents: a0506d4
Author: radai-rosenblatt <radai.rosenblatt@gmail.com>
Authored: Tue Oct 4 15:36:18 2016 -0700
Committer: Sean Busbey <busbey@apache.org>
Committed: Fri Jan 27 23:29:31 2017 -0600

----------------------------------------------------------------------
 .gitignore                                      |   2 +
 .../compiler/specific/TestSpecificCompiler.java |   2 +-
 .../avro/examples/baseball/Player.java          | 111 +++++++++++++++----
 .../tools/src/test/compiler/output/Player.java  | 111 +++++++++++++++----
 4 files changed, 183 insertions(+), 43 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/avro/blob/49f3bf03/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 8c6b133..ff49fe9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,5 @@ target
 /build
 test-output
 /dist
+/.idea
+*.iml

http://git-wip-us.apache.org/repos/asf/avro/blob/49f3bf03/lang/java/ipc/src/test/java/org/apache/avro/compiler/specific/TestSpecificCompiler.java
----------------------------------------------------------------------
diff --git a/lang/java/ipc/src/test/java/org/apache/avro/compiler/specific/TestSpecificCompiler.java
b/lang/java/ipc/src/test/java/org/apache/avro/compiler/specific/TestSpecificCompiler.java
index cd70b56..34a3601 100644
--- a/lang/java/ipc/src/test/java/org/apache/avro/compiler/specific/TestSpecificCompiler.java
+++ b/lang/java/ipc/src/test/java/org/apache/avro/compiler/specific/TestSpecificCompiler.java
@@ -217,7 +217,7 @@ public class TestSpecificCompiler {
       if (o.path.endsWith("Simple.java")) {
         count++;
         assertTrue(o.contents.contains("/** Protocol used for testing. */"));
-        assertTrue(o.contents.contains("/** Send a greeting */"));
+        assertTrue(o.contents.contains("* Send a greeting"));
       }
     }
     assertEquals("Missed generated protocol!", 1, count);

http://git-wip-us.apache.org/repos/asf/avro/blob/49f3bf03/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 310b0ef..6313529 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
@@ -114,17 +114,28 @@ public class Player extends org.apache.avro.specific.SpecificRecordBase
implemen
     this.position = value;
   }
 
-  /** Creates a new Player RecordBuilder */
+  /**
+   * Creates a new Player RecordBuilder.
+   * @return A new Player RecordBuilder
+   */
   public static avro.examples.baseball.Player.Builder newBuilder() {
     return new avro.examples.baseball.Player.Builder();
   }
   
-  /** Creates a new Player RecordBuilder by copying an existing Builder */
+  /**
+   * Creates a new Player RecordBuilder by copying an existing Builder.
+   * @param other The existing builder to copy.
+   * @return A new Player RecordBuilder
+   */
   public static avro.examples.baseball.Player.Builder newBuilder(avro.examples.baseball.Player.Builder
other) {
     return new avro.examples.baseball.Player.Builder(other);
   }
   
-  /** Creates a new Player RecordBuilder by copying an existing Player instance */
+  /**
+   * Creates a new Player RecordBuilder by copying an existing Player instance.
+   * @param other The existing instance to copy.
+   * @return A new Player RecordBuilder
+   */
   public static avro.examples.baseball.Player.Builder newBuilder(avro.examples.baseball.Player
other) {
     return new avro.examples.baseball.Player.Builder(other);
   }
@@ -145,7 +156,10 @@ public class Player extends org.apache.avro.specific.SpecificRecordBase
implemen
       super(avro.examples.baseball.Player.SCHEMA$);
     }
     
-    /** Creates a Builder by copying an existing Builder */
+    /**
+     * Creates a Builder by copying an existing Builder.
+     * @param other The existing Builder to copy.
+     */
     private Builder(avro.examples.baseball.Player.Builder other) {
       super(other);
       if (isValidValue(fields()[0], other.number)) {
@@ -166,7 +180,10 @@ public class Player extends org.apache.avro.specific.SpecificRecordBase
implemen
       }
     }
     
-    /** Creates a Builder by copying an existing Player instance */
+    /**
+     * Creates a Builder by copying an existing Player instance
+     * @param other The existing instance to copy.
+     */
     private Builder(avro.examples.baseball.Player other) {
             super(avro.examples.baseball.Player.SCHEMA$);
       if (isValidValue(fields()[0], other.number)) {
@@ -187,12 +204,19 @@ public class Player extends org.apache.avro.specific.SpecificRecordBase
implemen
       }
     }
 
-    /** Gets the value of the 'number' field */
+    /**
+     * Gets the value of the 'number' field.
+     * @return The value.
+     */
     public java.lang.Integer getNumber() {
       return number;
     }
     
-    /** Sets the value of the 'number' field */
+    /**
+     * Sets the value of the 'number' field.
+     * @param value The value of 'number'.
+     * @return This builder.
+     */
     public avro.examples.baseball.Player.Builder setNumber(int value) {
       validate(fields()[0], value);
       this.number = value;
@@ -200,23 +224,36 @@ public class Player extends org.apache.avro.specific.SpecificRecordBase
implemen
       return this; 
     }
     
-    /** Checks whether the 'number' field has been set */
+    /**
+     * Checks whether the 'number' field has been set.
+     * @return True if the 'number' field has been set, false otherwise.
+     */
     public boolean hasNumber() {
       return fieldSetFlags()[0];
     }
     
-    /** Clears the value of the 'number' field */
+    /**
+     * Clears the value of the 'number' field.
+     * @return This builder.
+     */
     public avro.examples.baseball.Player.Builder clearNumber() {
       fieldSetFlags()[0] = false;
       return this;
     }
 
-    /** Gets the value of the 'first_name' field */
+    /**
+     * Gets the value of the 'first_name' field.
+     * @return The value.
+     */
     public java.lang.String getFirstName() {
       return first_name;
     }
     
-    /** Sets the value of the 'first_name' field */
+    /**
+     * Sets the value of the 'first_name' field.
+     * @param value The value of 'first_name'.
+     * @return This builder.
+     */
     public avro.examples.baseball.Player.Builder setFirstName(java.lang.String value) {
       validate(fields()[1], value);
       this.first_name = value;
@@ -224,24 +261,37 @@ public class Player extends org.apache.avro.specific.SpecificRecordBase
implemen
       return this; 
     }
     
-    /** Checks whether the 'first_name' field has been set */
+    /**
+     * Checks whether the 'first_name' field has been set.
+     * @return True if the 'first_name' field has been set, false otherwise.
+     */
     public boolean hasFirstName() {
       return fieldSetFlags()[1];
     }
     
-    /** Clears the value of the 'first_name' field */
+    /**
+     * Clears the value of the 'first_name' field.
+     * @return This builder.
+     */
     public avro.examples.baseball.Player.Builder clearFirstName() {
       first_name = null;
       fieldSetFlags()[1] = false;
       return this;
     }
 
-    /** Gets the value of the 'last_name' field */
+    /**
+     * Gets the value of the 'last_name' field.
+     * @return The value.
+     */
     public java.lang.String getLastName() {
       return last_name;
     }
     
-    /** Sets the value of the 'last_name' field */
+    /**
+     * Sets the value of the 'last_name' field.
+     * @param value The value of 'last_name'.
+     * @return This builder.
+     */
     public avro.examples.baseball.Player.Builder setLastName(java.lang.String value) {
       validate(fields()[2], value);
       this.last_name = value;
@@ -249,24 +299,37 @@ public class Player extends org.apache.avro.specific.SpecificRecordBase
implemen
       return this; 
     }
     
-    /** Checks whether the 'last_name' field has been set */
+    /**
+     * Checks whether the 'last_name' field has been set.
+     * @return True if the 'last_name' field has been set, false otherwise.
+     */
     public boolean hasLastName() {
       return fieldSetFlags()[2];
     }
     
-    /** Clears the value of the 'last_name' field */
+    /**
+     * Clears the value of the 'last_name' field.
+     * @return This builder.
+     */
     public avro.examples.baseball.Player.Builder clearLastName() {
       last_name = null;
       fieldSetFlags()[2] = false;
       return this;
     }
 
-    /** Gets the value of the 'position' field */
+    /**
+     * Gets the value of the 'position' field.
+     * @return The value.
+     */
     public java.util.List<avro.examples.baseball.Position> getPosition() {
       return position;
     }
     
-    /** Sets the value of the 'position' field */
+    /**
+     * Sets the value of the 'position' field.
+     * @param value The value of 'position'.
+     * @return This builder.
+     */
     public avro.examples.baseball.Player.Builder setPosition(java.util.List<avro.examples.baseball.Position>
value) {
       validate(fields()[3], value);
       this.position = value;
@@ -274,12 +337,18 @@ public class Player extends org.apache.avro.specific.SpecificRecordBase
implemen
       return this; 
     }
     
-    /** Checks whether the 'position' field has been set */
+    /**
+     * Checks whether the 'position' field has been set.
+     * @return True if the 'position' field has been set, false otherwise.
+     */
     public boolean hasPosition() {
       return fieldSetFlags()[3];
     }
     
-    /** Clears the value of the 'position' field */
+    /**
+     * Clears the value of the 'position' field.
+     * @return This builder.
+     */
     public avro.examples.baseball.Player.Builder clearPosition() {
       position = null;
       fieldSetFlags()[3] = false;

http://git-wip-us.apache.org/repos/asf/avro/blob/49f3bf03/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 f8a2113..9773c29 100644
--- a/lang/java/tools/src/test/compiler/output/Player.java
+++ b/lang/java/tools/src/test/compiler/output/Player.java
@@ -114,17 +114,28 @@ public class Player extends org.apache.avro.specific.SpecificRecordBase
implemen
     this.position = value;
   }
 
-  /** Creates a new Player RecordBuilder */
+  /**
+   * Creates a new Player RecordBuilder.
+   * @return A new Player RecordBuilder
+   */
   public static avro.examples.baseball.Player.Builder newBuilder() {
     return new avro.examples.baseball.Player.Builder();
   }
   
-  /** Creates a new Player RecordBuilder by copying an existing Builder */
+  /**
+   * Creates a new Player RecordBuilder by copying an existing Builder.
+   * @param other The existing builder to copy.
+   * @return A new Player RecordBuilder
+   */
   public static avro.examples.baseball.Player.Builder newBuilder(avro.examples.baseball.Player.Builder
other) {
     return new avro.examples.baseball.Player.Builder(other);
   }
   
-  /** Creates a new Player RecordBuilder by copying an existing Player instance */
+  /**
+   * Creates a new Player RecordBuilder by copying an existing Player instance.
+   * @param other The existing instance to copy.
+   * @return A new Player RecordBuilder
+   */
   public static avro.examples.baseball.Player.Builder newBuilder(avro.examples.baseball.Player
other) {
     return new avro.examples.baseball.Player.Builder(other);
   }
@@ -145,7 +156,10 @@ public class Player extends org.apache.avro.specific.SpecificRecordBase
implemen
       super(avro.examples.baseball.Player.SCHEMA$);
     }
     
-    /** Creates a Builder by copying an existing Builder */
+    /**
+     * Creates a Builder by copying an existing Builder.
+     * @param other The existing Builder to copy.
+     */
     private Builder(avro.examples.baseball.Player.Builder other) {
       super(other);
       if (isValidValue(fields()[0], other.number)) {
@@ -166,7 +180,10 @@ public class Player extends org.apache.avro.specific.SpecificRecordBase
implemen
       }
     }
     
-    /** Creates a Builder by copying an existing Player instance */
+    /**
+     * Creates a Builder by copying an existing Player instance
+     * @param other The existing instance to copy.
+     */
     private Builder(avro.examples.baseball.Player other) {
             super(avro.examples.baseball.Player.SCHEMA$);
       if (isValidValue(fields()[0], other.number)) {
@@ -187,12 +204,19 @@ public class Player extends org.apache.avro.specific.SpecificRecordBase
implemen
       }
     }
 
-    /** Gets the value of the 'number' field */
+    /**
+     * Gets the value of the 'number' field.
+     * @return The value.
+     */
     public java.lang.Integer getNumber() {
       return number;
     }
     
-    /** Sets the value of the 'number' field */
+    /**
+     * Sets the value of the 'number' field.
+     * @param value The value of 'number'.
+     * @return This builder.
+     */
     public avro.examples.baseball.Player.Builder setNumber(int value) {
       validate(fields()[0], value);
       this.number = value;
@@ -200,23 +224,36 @@ public class Player extends org.apache.avro.specific.SpecificRecordBase
implemen
       return this; 
     }
     
-    /** Checks whether the 'number' field has been set */
+    /**
+     * Checks whether the 'number' field has been set.
+     * @return True if the 'number' field has been set, false otherwise.
+     */
     public boolean hasNumber() {
       return fieldSetFlags()[0];
     }
     
-    /** Clears the value of the 'number' field */
+    /**
+     * Clears the value of the 'number' field.
+     * @return This builder.
+     */
     public avro.examples.baseball.Player.Builder clearNumber() {
       fieldSetFlags()[0] = false;
       return this;
     }
 
-    /** Gets the value of the 'first_name' field */
+    /**
+     * Gets the value of the 'first_name' field.
+     * @return The value.
+     */
     public java.lang.CharSequence getFirstName() {
       return first_name;
     }
     
-    /** Sets the value of the 'first_name' field */
+    /**
+     * Sets the value of the 'first_name' field.
+     * @param value The value of 'first_name'.
+     * @return This builder.
+     */
     public avro.examples.baseball.Player.Builder setFirstName(java.lang.CharSequence value)
{
       validate(fields()[1], value);
       this.first_name = value;
@@ -224,24 +261,37 @@ public class Player extends org.apache.avro.specific.SpecificRecordBase
implemen
       return this; 
     }
     
-    /** Checks whether the 'first_name' field has been set */
+    /**
+     * Checks whether the 'first_name' field has been set.
+     * @return True if the 'first_name' field has been set, false otherwise.
+     */
     public boolean hasFirstName() {
       return fieldSetFlags()[1];
     }
     
-    /** Clears the value of the 'first_name' field */
+    /**
+     * Clears the value of the 'first_name' field.
+     * @return This builder.
+     */
     public avro.examples.baseball.Player.Builder clearFirstName() {
       first_name = null;
       fieldSetFlags()[1] = false;
       return this;
     }
 
-    /** Gets the value of the 'last_name' field */
+    /**
+     * Gets the value of the 'last_name' field.
+     * @return The value.
+     */
     public java.lang.CharSequence getLastName() {
       return last_name;
     }
     
-    /** Sets the value of the 'last_name' field */
+    /**
+     * Sets the value of the 'last_name' field.
+     * @param value The value of 'last_name'.
+     * @return This builder.
+     */
     public avro.examples.baseball.Player.Builder setLastName(java.lang.CharSequence value)
{
       validate(fields()[2], value);
       this.last_name = value;
@@ -249,24 +299,37 @@ public class Player extends org.apache.avro.specific.SpecificRecordBase
implemen
       return this; 
     }
     
-    /** Checks whether the 'last_name' field has been set */
+    /**
+     * Checks whether the 'last_name' field has been set.
+     * @return True if the 'last_name' field has been set, false otherwise.
+     */
     public boolean hasLastName() {
       return fieldSetFlags()[2];
     }
     
-    /** Clears the value of the 'last_name' field */
+    /**
+     * Clears the value of the 'last_name' field.
+     * @return This builder.
+     */
     public avro.examples.baseball.Player.Builder clearLastName() {
       last_name = null;
       fieldSetFlags()[2] = false;
       return this;
     }
 
-    /** Gets the value of the 'position' field */
+    /**
+     * Gets the value of the 'position' field.
+     * @return The value.
+     */
     public java.util.List<avro.examples.baseball.Position> getPosition() {
       return position;
     }
     
-    /** Sets the value of the 'position' field */
+    /**
+     * Sets the value of the 'position' field.
+     * @param value The value of 'position'.
+     * @return This builder.
+     */
     public avro.examples.baseball.Player.Builder setPosition(java.util.List<avro.examples.baseball.Position>
value) {
       validate(fields()[3], value);
       this.position = value;
@@ -274,12 +337,18 @@ public class Player extends org.apache.avro.specific.SpecificRecordBase
implemen
       return this; 
     }
     
-    /** Checks whether the 'position' field has been set */
+    /**
+     * Checks whether the 'position' field has been set.
+     * @return True if the 'position' field has been set, false otherwise.
+     */
     public boolean hasPosition() {
       return fieldSetFlags()[3];
     }
     
-    /** Clears the value of the 'position' field */
+    /**
+     * Clears the value of the 'position' field.
+     * @return This builder.
+     */
     public avro.examples.baseball.Player.Builder clearPosition() {
       position = null;
       fieldSetFlags()[3] = false;


Mime
View raw message