THRIFT-1526. java: Union TupleSchemeFactory returns StandardSchemes
This patch makes it return nice, proper TupleSchemes.
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1294925 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/java/src/org/apache/thrift/TUnion.java b/lib/java/src/org/apache/thrift/TUnion.java
index 0173f9b..3052ee1 100644
--- a/lib/java/src/org/apache/thrift/TUnion.java
+++ b/lib/java/src/org/apache/thrift/TUnion.java
@@ -17,15 +17,14 @@
*/
package org.apache.thrift;
+import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
-import java.nio.ByteBuffer;
-import org.apache.thrift.TUnion.TUnionStandardScheme;
import org.apache.thrift.protocol.TField;
import org.apache.thrift.protocol.TProtocol;
import org.apache.thrift.protocol.TProtocolException;
@@ -211,7 +210,7 @@
}
}
- public static class TUnionStandardScheme extends StandardScheme<TUnion> {
+ private static class TUnionStandardScheme extends StandardScheme<TUnion> {
@Override
public void read(TProtocol iprot, TUnion struct) throws TException {
@@ -250,12 +249,12 @@
}
private static class TUnionTupleSchemeFactory implements SchemeFactory {
- public TUnionStandardScheme getScheme() {
- return new TUnionStandardScheme();
+ public TUnionTupleScheme getScheme() {
+ return new TUnionTupleScheme();
}
}
- public static class TUnionTupleScheme extends TupleScheme<TUnion> {
+ private static class TUnionTupleScheme extends TupleScheme<TUnion> {
@Override
public void read(TProtocol iprot, TUnion struct) throws TException {