[ 
https://issues.apache.org/jira/browse/AVRO-2054?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16101405#comment-16101405
 ] 

Gabor Szadovszky commented on AVRO-2054:
----------------------------------------

+1

> 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, AVRO-2054.2.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)

Reply via email to