avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject [15/35] avro git commit: AVRO-1908: Fix TestSpecificCompiler reference to private method.
Date Sat, 05 Nov 2016 20:20:32 GMT
AVRO-1908: Fix TestSpecificCompiler reference to private method.

AVRO-1884 changed makePath to a private method from a package-private
static method. This broke the test that references the method in IPC.
The fix is to make the instance method package-private and update the
test to use an instance of SpecificCompiler.


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

Branch: refs/heads/branch-1.8
Commit: 79a6d8d81517d45544dba215432f786a9523f76f
Parents: 968550d
Author: Ryan Blue <blue@apache.org>
Authored: Sun Sep 4 14:54:40 2016 -0700
Committer: Ryan Blue <blue@apache.org>
Committed: Sat Nov 5 13:15:38 2016 -0700

----------------------------------------------------------------------
 CHANGES.txt                                                     | 3 +++
 .../org/apache/avro/compiler/specific/SpecificCompiler.java     | 2 +-
 .../org/apache/avro/compiler/specific/TestSpecificCompiler.java | 5 +++--
 3 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/avro/blob/79a6d8d8/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index c1205c0..e5ba5de 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -45,6 +45,9 @@ Trunk (not yet released)
     AVRO-1883: Java: Fix incompatible schema detection nested in unions.
     (Yibing Shi via blue)
 
+    AVRO-1908: Fix TestSpecificCompiler reference to private method.
+    (blue)
+
 Avro 1.8.1 (14 May 2016)
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/avro/blob/79a6d8d8/lang/java/compiler/src/main/java/org/apache/avro/compiler/specific/SpecificCompiler.java
----------------------------------------------------------------------
diff --git a/lang/java/compiler/src/main/java/org/apache/avro/compiler/specific/SpecificCompiler.java
b/lang/java/compiler/src/main/java/org/apache/avro/compiler/specific/SpecificCompiler.java
index d1b594f..5b6b3bb 100644
--- a/lang/java/compiler/src/main/java/org/apache/avro/compiler/specific/SpecificCompiler.java
+++ b/lang/java/compiler/src/main/java/org/apache/avro/compiler/specific/SpecificCompiler.java
@@ -406,7 +406,7 @@ public class SpecificCompiler {
     return outputFile;
   }
 
-  private String makePath(String name, String space) {
+  String makePath(String name, String space) {
     if (space == null || space.isEmpty()) {
       return name + suffix;
     } else {

http://git-wip-us.apache.org/repos/asf/avro/blob/79a6d8d8/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 7710be8..28aa998 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
@@ -79,8 +79,9 @@ public class TestSpecificCompiler {
 
   @Test
   public void testMakePath() {
-    assertEquals("foo/bar/Baz.java".replace("/", File.separator), SpecificCompiler.makePath("Baz",
"foo.bar"));
-    assertEquals("baz.java", SpecificCompiler.makePath("baz", ""));
+    SpecificCompiler compiler = new SpecificCompiler();
+    assertEquals("foo/bar/Baz.java".replace("/", File.separator), compiler.makePath("Baz",
"foo.bar"));
+    assertEquals("baz.java", compiler.makePath("baz", ""));
   }
 
   @Test


Mime
View raw message