RFR: 8272687: Replace StringBuffer with StringBuilder in RuleBasedCollator
Justin Lu
duke at openjdk.org
Mon Sep 26 22:17:41 UTC 2022
Problem: Unnecessary instances of StringBuffer + .toString()
Fix: StringBuffer Replaced with StringBuilder, and .toString() removed when possible
Other: Line 698 in RuleBasedCollator.java also uses a .toString() conversion, but removing that instance requires changing the RuleBasedCollationKey constructor's second parameter type from String to StringBuilder
automated testing run passed cleanly
-------------
Commit messages:
- Copyright update for fix
- Merge master into fix branch
- Fix: replace instances of StringBuffer with StringBuilder, drop String conversion
Changes: https://git.openjdk.org/jdk/pull/10432/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10432&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8272687
Stats: 10 lines in 2 files changed: 0 ins; 0 del; 10 mod
Patch: https://git.openjdk.org/jdk/pull/10432.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/10432/head:pull/10432
PR: https://git.openjdk.org/jdk/pull/10432
More information about the core-libs-dev
mailing list