avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r1213509 - in /avro/trunk: ./ lang/java/compiler/src/main/velocity/org/apache/avro/compiler/specific/templates/java/classic/
Date Tue, 13 Dec 2011 00:16:00 GMT
Author: cutting
Date: Tue Dec 13 00:16:00 2011
New Revision: 1213509

URL: http://svn.apache.org/viewvc?rev=1213509&view=rev
Log:
Java: Fix codegen to not generate deprecated code.  Contributed by Hamed Asghari.

Modified:
    avro/trunk/CHANGES.txt
    avro/trunk/lang/java/compiler/src/main/velocity/org/apache/avro/compiler/specific/templates/java/classic/enum.vm
    avro/trunk/lang/java/compiler/src/main/velocity/org/apache/avro/compiler/specific/templates/java/classic/fixed.vm
    avro/trunk/lang/java/compiler/src/main/velocity/org/apache/avro/compiler/specific/templates/java/classic/record.vm

Modified: avro/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/avro/trunk/CHANGES.txt?rev=1213509&r1=1213508&r2=1213509&view=diff
==============================================================================
--- avro/trunk/CHANGES.txt (original)
+++ avro/trunk/CHANGES.txt Tue Dec 13 00:16:00 2011
@@ -37,6 +37,9 @@ Avro 1.6.2 (unreleased)
     AVRO-966. Java: Fix ReflectDatumWriter to be able to correctly
     write unions containing Collection and/or ByteBuffer. (cutting)
 
+    AVRO-977. Java: Fix codegen to not generate deprecated code. 
+    (Hamed Asghari via cutting)
+
 Avro 1.6.1 (8 November 2011)
 
   INCOMPATIBLE CHANGES

Modified: avro/trunk/lang/java/compiler/src/main/velocity/org/apache/avro/compiler/specific/templates/java/classic/enum.vm
URL: http://svn.apache.org/viewvc/avro/trunk/lang/java/compiler/src/main/velocity/org/apache/avro/compiler/specific/templates/java/classic/enum.vm?rev=1213509&r1=1213508&r2=1213509&view=diff
==============================================================================
--- avro/trunk/lang/java/compiler/src/main/velocity/org/apache/avro/compiler/specific/templates/java/classic/enum.vm
(original)
+++ avro/trunk/lang/java/compiler/src/main/velocity/org/apache/avro/compiler/specific/templates/java/classic/enum.vm
Tue Dec 13 00:16:00 2011
@@ -25,5 +25,5 @@ package $schema.getNamespace();  
 public enum ${this.mangle($schema.getName())} { 
   #foreach ($symbol in ${schema.getEnumSymbols()})${this.mangle($symbol)}#if ($velocityHasNext),
#end#end
   ;
-  public static final org.apache.avro.Schema SCHEMA$ = org.apache.avro.Schema.parse("${this.javaEscape($schema.toString())}");
+  public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("${this.javaEscape($schema.toString())}");
 }

Modified: avro/trunk/lang/java/compiler/src/main/velocity/org/apache/avro/compiler/specific/templates/java/classic/fixed.vm
URL: http://svn.apache.org/viewvc/avro/trunk/lang/java/compiler/src/main/velocity/org/apache/avro/compiler/specific/templates/java/classic/fixed.vm?rev=1213509&r1=1213508&r2=1213509&view=diff
==============================================================================
--- avro/trunk/lang/java/compiler/src/main/velocity/org/apache/avro/compiler/specific/templates/java/classic/fixed.vm
(original)
+++ avro/trunk/lang/java/compiler/src/main/velocity/org/apache/avro/compiler/specific/templates/java/classic/fixed.vm
Tue Dec 13 00:16:00 2011
@@ -24,7 +24,7 @@ package $schema.getNamespace();  
 #end
 @org.apache.avro.specific.FixedSize($schema.getFixedSize())
 public class ${this.mangle($schema.getName())} extends org.apache.avro.specific.SpecificFixed
{
-  public static final org.apache.avro.Schema SCHEMA$ = org.apache.avro.Schema.parse("${this.javaEscape($schema.toString())}");
+  public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("${this.javaEscape($schema.toString())}");
   
   /** Creates a new ${this.mangle($schema.getName())} */
   public ${this.mangle($schema.getName())}() {

Modified: avro/trunk/lang/java/compiler/src/main/velocity/org/apache/avro/compiler/specific/templates/java/classic/record.vm
URL: http://svn.apache.org/viewvc/avro/trunk/lang/java/compiler/src/main/velocity/org/apache/avro/compiler/specific/templates/java/classic/record.vm?rev=1213509&r1=1213508&r2=1213509&view=diff
==============================================================================
--- avro/trunk/lang/java/compiler/src/main/velocity/org/apache/avro/compiler/specific/templates/java/classic/record.vm
(original)
+++ avro/trunk/lang/java/compiler/src/main/velocity/org/apache/avro/compiler/specific/templates/java/classic/record.vm
Tue Dec 13 00:16:00 2011
@@ -23,7 +23,7 @@ package $schema.getNamespace();  
 /** $schema.getDoc() */
 #end
 public class ${this.mangle($schema.getName())}#if ($schema.isError()) extends org.apache.avro.specific.SpecificExceptionBase#else
extends org.apache.avro.specific.SpecificRecordBase#end implements org.apache.avro.specific.SpecificRecord
{
-  public static final org.apache.avro.Schema SCHEMA$ = org.apache.avro.Schema.parse("${this.javaEscape($schema.toString())}");
+  public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("${this.javaEscape($schema.toString())}");
 #foreach ($field in $schema.getFields())
 #if ($field.doc())
   /** $field.doc() */



Mime
View raw message