THRIFT-5203: Remove Unused toString Method in TSerializer
Client: cpp
Patch: David Mollitor
This closes #2138
diff --git a/lib/java/src/org/apache/thrift/TSerializer.java b/lib/java/src/org/apache/thrift/TSerializer.java
index 4bf057d..90cc039 100644
--- a/lib/java/src/org/apache/thrift/TSerializer.java
+++ b/lib/java/src/org/apache/thrift/TSerializer.java
@@ -20,7 +20,6 @@
package org.apache.thrift;
import java.io.ByteArrayOutputStream;
-import java.io.UnsupportedEncodingException;
import org.apache.thrift.protocol.TBinaryProtocol;
import org.apache.thrift.protocol.TProtocol;
@@ -83,22 +82,6 @@
}
/**
- * Serialize the Thrift object into a Java string, using a specified
- * character set for encoding.
- *
- * @param base The object to serialize
- * @param charset Valid JVM charset
- * @return Serialized object as a String
- */
- public String toString(TBase base, String charset) throws TException {
- try {
- return new String(serialize(base), charset);
- } catch (UnsupportedEncodingException uex) {
- throw new TException("JVM DOES NOT SUPPORT ENCODING: " + charset);
- }
- }
-
- /**
* Serialize the Thrift object into a Java string, using the default JVM
* charset encoding.
*