avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r774441 - in /hadoop/avro/trunk: ./ src/java/org/apache/avro/specific/ src/test/java/org/apache/avro/ src/test/py/ src/test/schemata/
Date Wed, 13 May 2009 17:17:26 GMT
Author: cutting
Date: Wed May 13 17:17:25 2009
New Revision: 774441

URL: http://svn.apache.org/viewvc?rev=774441&view=rev
Log:
AVRO-31. Fix Java package imports in generated specific classes.  Contributed by sharad.

Modified:
    hadoop/avro/trunk/CHANGES.txt
    hadoop/avro/trunk/src/java/org/apache/avro/specific/SpecificCompiler.java
    hadoop/avro/trunk/src/test/java/org/apache/avro/TestProtocolReflect.java
    hadoop/avro/trunk/src/test/java/org/apache/avro/TestProtocolSpecific.java
    hadoop/avro/trunk/src/test/java/org/apache/avro/TestReflect.java
    hadoop/avro/trunk/src/test/py/testioreflect.py
    hadoop/avro/trunk/src/test/schemata/test.js

Modified: hadoop/avro/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/CHANGES.txt?rev=774441&r1=774440&r2=774441&view=diff
==============================================================================
--- hadoop/avro/trunk/CHANGES.txt (original)
+++ hadoop/avro/trunk/CHANGES.txt Wed May 13 17:17:25 2009
@@ -44,3 +44,6 @@
 
     AVRO-14. Fix so that EOF is not thrown when one attempts to read
     an empty buffer.  (sharad via cutting)
+
+    AVRO-31. Fix Java package imports in generated specific classes.
+    (sharad via cutting)

Modified: hadoop/avro/trunk/src/java/org/apache/avro/specific/SpecificCompiler.java
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/java/org/apache/avro/specific/SpecificCompiler.java?rev=774441&r1=774440&r2=774441&view=diff
==============================================================================
--- hadoop/avro/trunk/src/java/org/apache/avro/specific/SpecificCompiler.java (original)
+++ hadoop/avro/trunk/src/java/org/apache/avro/specific/SpecificCompiler.java Wed May 13 17:17:25
2009
@@ -86,10 +86,15 @@
   }
 
   private void header(String namespace) {
-    line(0, "package "+namespace+";\n");
+    if(namespace != null) {
+      line(0, "package "+namespace+";\n");
+    }
     line(0, "import java.nio.ByteBuffer;");
     line(0, "import java.util.Map;");
     line(0, "import org.apache.avro.Protocol;");
+    line(0, "import org.apache.avro.Schema;");
+    line(0, "import org.apache.avro.AvroRuntimeException;");
+    line(0, "import org.apache.avro.Protocol;");
     line(0, "import org.apache.avro.util.Utf8;");
     line(0, "import org.apache.avro.ipc.AvroRemoteException;");
     line(0, "import org.apache.avro.generic.GenericArray;");

Modified: hadoop/avro/trunk/src/test/java/org/apache/avro/TestProtocolReflect.java
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/test/java/org/apache/avro/TestProtocolReflect.java?rev=774441&r1=774440&r2=774441&view=diff
==============================================================================
--- hadoop/avro/trunk/src/test/java/org/apache/avro/TestProtocolReflect.java (original)
+++ hadoop/avro/trunk/src/test/java/org/apache/avro/TestProtocolReflect.java Wed May 13 17:17:25
2009
@@ -36,7 +36,8 @@
 import org.apache.avro.reflect.*;
 import org.apache.avro.util.*;
 
-import org.apache.avro.Test.TestRecord;
+import org.apache.avro.test.Test.TestRecord;
+import org.apache.avro.test.*;
 
 public class TestProtocolReflect extends TestProtocolSpecific {
 

Modified: hadoop/avro/trunk/src/test/java/org/apache/avro/TestProtocolSpecific.java
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/test/java/org/apache/avro/TestProtocolSpecific.java?rev=774441&r1=774440&r2=774441&view=diff
==============================================================================
--- hadoop/avro/trunk/src/test/java/org/apache/avro/TestProtocolSpecific.java (original)
+++ hadoop/avro/trunk/src/test/java/org/apache/avro/TestProtocolSpecific.java Wed May 13 17:17:25
2009
@@ -35,8 +35,9 @@
 import org.apache.avro.specific.*;
 import org.apache.avro.util.*;
 
-import org.apache.avro.Test.TestRecord;
-import org.apache.avro.Test.TestError;
+import org.apache.avro.test.Test.TestRecord;
+import org.apache.avro.test.Test.TestError;
+import org.apache.avro.test.*;
 
 public class TestProtocolSpecific extends TestCase {
   private static final Logger LOG

Modified: hadoop/avro/trunk/src/test/java/org/apache/avro/TestReflect.java
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/test/java/org/apache/avro/TestReflect.java?rev=774441&r1=774440&r2=774441&view=diff
==============================================================================
--- hadoop/avro/trunk/src/test/java/org/apache/avro/TestReflect.java (original)
+++ hadoop/avro/trunk/src/test/java/org/apache/avro/TestReflect.java Wed May 13 17:17:25 2009
@@ -36,7 +36,8 @@
 import org.apache.avro.reflect.*;
 import org.apache.avro.util.*;
 
-import org.apache.avro.Test.TestRecord;
+import org.apache.avro.test.Test.TestRecord;
+import org.apache.avro.test.*;
 
 public class TestReflect extends TestCase {
   private static final Logger LOG

Modified: hadoop/avro/trunk/src/test/py/testioreflect.py
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/test/py/testioreflect.py?rev=774441&r1=774440&r2=774441&view=diff
==============================================================================
--- hadoop/avro/trunk/src/test/py/testioreflect.py (original)
+++ hadoop/avro/trunk/src/test/py/testioreflect.py Wed May 13 17:17:25 2009
@@ -19,7 +19,7 @@
 import avro.generic as generic
 import testio
 
-_PKGNAME = "org.apache.avro."
+_PKGNAME = "org.apache.avro.test."
 
 def dyvalidator(schm, object):
   return reflect.validate(schm, _PKGNAME, object)

Modified: hadoop/avro/trunk/src/test/schemata/test.js
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/test/schemata/test.js?rev=774441&r1=774440&r2=774441&view=diff
==============================================================================
--- hadoop/avro/trunk/src/test/schemata/test.js (original)
+++ hadoop/avro/trunk/src/test/schemata/test.js Wed May 13 17:17:25 2009
@@ -1,4 +1,4 @@
-{"namespace": "org.apache.avro",
+{"namespace": "org.apache.avro.test",
  "protocol": "Test",
 
  "types": [



Mime
View raw message