[
https://issues.apache.org/jira/browse/HADOOP-19134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17874386#comment-17874386
]
ASF GitHub Bot commented on HADOOP-19134:
-----------------------------------------
pjfanning commented on PR #6692:
URL: https://github.com/apache/hadoop/pull/6692#issuecomment-2294159706
> I still see some usage of StringBuffer in the code, is that intentional?
We just want to replace in couple of places? <img alt="image" width="1411"
src="https://private-user-images.githubusercontent.com/25608848/358703021-3a82ba2a-62ff-4db4-8b40-c915d7ed5887.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM4MzkwNTAsIm5iZiI6MTcyMzgzODc1MCwicGF0aCI6Ii8yNTYwODg0OC8zNTg3MDMwMjEtM2E4MmJhMmEtNjJmZi00ZGI0LThiNDAtYzkxNWQ3ZWQ1ODg3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE2VDIwMDU1MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk5YTRmM2NlZDNiNjNiMWEyMGQzZjRmYmM2YzhhNGY2NGYxNjc2MjlhZTY5OGQ0OWNjMDAwYzQ4MDQ4MWZkNzImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.9wW9pXM29cilCiocZTA_1FL_IfHNepQXQXjLwQ1p0yk">
I didn't focus too much on the test code because I wanted to keep the size
of the PR down. There are also a few places where StringBuffer is required by
the APIs that are used.
> use StringBuilder instead of StringBuffer
> -----------------------------------------
>
> Key: HADOOP-19134
> URL: https://issues.apache.org/jira/browse/HADOOP-19134
> Project: Hadoop Common
> Issue Type: Improvement
> Reporter: PJ Fanning
> Assignee: PJ Fanning
> Priority: Major
> Labels: pull-request-available
>
> StringBuilder is basically the same as StringBuffer but doesn't use
> synchronized. String appending rarely needs locking like this.
> There are some public and package private APIs that use StringBuffers as
> input or return types - I have left these alone for compatibility reasons.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]