avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r967185 - in /avro/trunk: CHANGES.txt lang/java/src/java/org/apache/avro/specific/SpecificCompiler.java
Date Fri, 23 Jul 2010 18:13:48 GMT
Author: cutting
Date: Fri Jul 23 18:13:48 2010
New Revision: 967185

URL: http://svn.apache.org/viewvc?rev=967185&view=rev
Log:
AVRO-582.  Java: Add comment to generated code indicating that set() and get() are not for
use by applications.

Modified:
    avro/trunk/CHANGES.txt
    avro/trunk/lang/java/src/java/org/apache/avro/specific/SpecificCompiler.java

Modified: avro/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/avro/trunk/CHANGES.txt?rev=967185&r1=967184&r2=967185&view=diff
==============================================================================
--- avro/trunk/CHANGES.txt (original)
+++ avro/trunk/CHANGES.txt Fri Jul 23 18:13:48 2010
@@ -76,6 +76,9 @@ Avro 1.4.0 (unreleased)
     AVRO-581. Java: Update MapReduce APIs to use key/value pairs for
     intermediate data.  (cutting)
 
+    AVRO-582. Java: Add comment to generated code indicating that
+    set() and get() are not for use by applications.  (cutting)
+
   BUG FIXES
 
     AVRO-502. Memory leak from parsing JSON schema.

Modified: avro/trunk/lang/java/src/java/org/apache/avro/specific/SpecificCompiler.java
URL: http://svn.apache.org/viewvc/avro/trunk/lang/java/src/java/org/apache/avro/specific/SpecificCompiler.java?rev=967185&r1=967184&r2=967185&view=diff
==============================================================================
--- avro/trunk/lang/java/src/java/org/apache/avro/specific/SpecificCompiler.java (original)
+++ avro/trunk/lang/java/src/java/org/apache/avro/specific/SpecificCompiler.java Fri Jul 23
18:13:48 2010
@@ -272,6 +272,7 @@ public class SpecificCompiler {
       // schema method
       line(out, 1, "public org.apache.avro.Schema getSchema() { return SCHEMA$; }");
       // get method
+      line(out, 1, "// Used by DatumWriter.  Applications should not call. ");
       line(out, 1, "public java.lang.Object get(int field$) {");
       line(out, 2, "switch (field$) {");
       int i = 0;
@@ -280,7 +281,8 @@ public class SpecificCompiler {
       line(out, 2, "default: throw new org.apache.avro.AvroRuntimeException(\"Bad index\");");
       line(out, 2, "}");
       line(out, 1, "}");
-      // set method
+      // put method
+      line(out, 1, "// Used by DatumReader.  Applications should not call. ");
       line(out, 1, "@SuppressWarnings(value=\"unchecked\")");
       line(out, 1, "public void put(int field$, java.lang.Object value$) {");
       line(out, 2, "switch (field$) {");



Mime
View raw message