Nixed deprecated transformer.

This commit is contained in:
Michael Bayne
2010-07-06 18:15:37 +00:00
parent 20e06e9789
commit 0b84e08917
2 changed files with 1 additions and 27 deletions
@@ -51,32 +51,6 @@ import com.google.common.collect.Sets;
*/
public class Transformers
{
/**
* Combines the contents of a String[] column into a single string, separated by tabs. Any tabs
* in the strings will be escaped.
*
* @deprecated does not encode {} and { "" } differently; cannot handle null.
*/
@Deprecated public static class TabSeparatedString implements Transformer<String[], String> {
public String toPersistent (String[] values) {
StringBuffer buf = new StringBuffer();
for (String value : values) {
if (buf.length() > 0) {
buf.append("\t");
}
buf.append(value.replace("\t", "\\\t"));
}
return buf.toString();
}
public String[] fromPersistent (Type ftype, String value) {
String[] values = value.replace("\\\t", "%%ESCTAB%%").split("\t");
for (int ii = 0; ii < values.length; ii++) {
values[ii] = values[ii].replace("%%ESCTAB%%", "\t");
}
return values;
}
}
/**
* Combines the contents of a String[] column into a single String, terminating
* each String element with a newline.
@@ -165,7 +165,7 @@ public class TransformTest extends TestBase
public static class BadTransformRecord extends PersistentRecord
{
@Transform(Transformers.TabSeparatedString.class)
@Transform(Transformers.StringArray.class)
public Thread thread;
public InvalidCustomType invalid;