Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace StringBuffer with StringBuilder where possible #30964

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ static String convertToString( byte[] bytes )
}

char[] hex = Hex.encodeHex( bytes );
StringBuffer sb = new StringBuffer();
StringBuilder sb = new StringBuilder();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that we should avoid changing this source file. It is from upstream (see #30972 to fix the license) and we should not deviate unless absolutely necessary (it could get reverted in a future import from upstream anyway).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, will close this then.


// start with 'S'
sb.append( 'S' );
Expand All @@ -65,7 +65,7 @@ static String convertToString( byte[] bytes )
// sub-authorities, little-endian
for ( int i = 0; i < count; i++ )
{
StringBuffer rid = new StringBuffer();
StringBuilder rid = new StringBuilder();

for ( int k = 3; k >= 0; k-- )
{
Expand Down