[jira] [Commented] (AVRO-2054) Use StringBuilder instead of StringBuffer

2017-07-26 Thread Gabor Szadovszky (JIRA)

[ 
https://issues.apache.org/jira/browse/AVRO-2054?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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 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)


[jira] [Commented] (AVRO-2054) Use StringBuilder instead of StringBuffer

2017-07-20 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on AVRO-2054:
-

| (/) *{color:green}+1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} reexec {color} | {color:blue}  0m 
12s{color} | {color:blue} Docker mode activated. {color} |
| {color:green}+1{color} | {color:green} @author {color} | {color:green}  0m  
0s{color} | {color:green} The patch does not contain any @author tags. {color} |
| {color:green}+1{color} | {color:green} buildtest {color} | {color:green}  0m  
0s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} whitespace {color} | {color:green}  0m 
 0s{color} | {color:green} The patch has no whitespace issues. {color} |
| {color:green}+1{color} | {color:green} buildtest {color} | {color:green}  6m 
35s{color} | {color:green} the patch passed {color} |
| {color:black}{color} | {color:black} {color} | {color:black}  6m 51s{color} | 
{color:black} {color} |
\\
\\
|| Subsystem || Report/Notes ||
| Docker | Client=1.13.1 Server=1.13.1 Image:yetus/avro:793178a |
| JIRA Issue | AVRO-2054 |
| JIRA Patch URL | 
https://issues.apache.org/jira/secure/attachment/12877859/AVRO-2054.1.patch |
| Optional Tests |  buildtest  javac  |
| uname | Linux 009ba9974657 3.13.0-117-generic #164-Ubuntu SMP Fri Apr 7 
11:05:26 UTC 2017 x86_64 GNU/Linux |
| Build tool | build |
| git revision | master / 793178a |
| Default Java | 1.7.0_111 |
| modules | C: lang/java U: lang/java |
| Console output | 
https://builds.apache.org/job/PreCommit-AVRO-Build-TEST/31/console |
| Powered by | Apache Yetus 0.4.0   http://yetus.apache.org |


This message was automatically generated.



> 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 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)


[jira] [Commented] (AVRO-2054) Use StringBuilder instead of StringBuffer

2017-07-20 Thread Suraj Acharya (JIRA)

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

Suraj Acharya commented on AVRO-2054:
-

Thanks for the patch [~belugabehr].

Only one comment :
* Can you change the variable from {{buffer}} to {{builder}}. It makes the 
consistency better.

> 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 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)