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] [Assigned] (AVRO-2054) Use StringBuilder instead of
StringBuffer
[ https://issues.apache.org/jira/browse/AVRO-2054?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
BELUGA BEHR reassigned AVRO-2054:
---------------------------------
Assignee: BELUGA BEHR
> 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.7.7, 1.8.2
> Reporter: BELUGA BEHR
> Assignee: BELUGA BEHR
> Priority: Trivial
> Attachments: AVRO-2054.1.patch
>
>
> 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)