You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "BELUGA BEHR (JIRA)" <ji...@apache.org> on 2017/07/18 19:07:00 UTC
[jira] [Created] (AVRO-2054) Use StringBuilder instead of
StringBuffer
BELUGA BEHR created AVRO-2054:
---------------------------------
Summary: Use StringBuilder instead of StringBuffer
Key: AVRO-2054
URL: https://issues.apache.org/jira/browse/AVRO-2054
Project: Avro
Issue Type: Improvement
Affects Versions: 1.8.2, 1.7.7
Reporter: BELUGA BEHR
Priority: Trivial
Use the un-synchronized StringBuilder instead of StringBuffer. Use _char_ values instead of Strings.
{code:title=org.apache.trevni.MetaData}
@Override public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append("{ ");
for (Map.Entry<String,byte[]> e : entrySet()) {
buffer.append(e.getKey());
buffer.append("=");
try {
buffer.append(new String(e.getValue(), "ISO-8859-1"));
} catch (java.io.UnsupportedEncodingException error) {
throw new TrevniRuntimeException(error);
}
buffer.append(" ");
}
buffer.append("}");
return buffer.toString();
}
{code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)