RFR: 8349991: GraphUtils.java can use String.replace() instead of String.replaceAll()
Maurizio Cimadamore
mcimadamore at openjdk.org
Mon Feb 24 11:43:52 UTC 2025
On Mon, 17 Feb 2025 02:38:20 GMT, Archie Cobbs <acobbs at openjdk.org> wrote:
> This is a tiny performance improvement that replaces a few invocations of `String.replaceAll()` with equivalent invocations of `String.replace(char, char)` and avoids the unnecessary use of regular expressions.
src/jdk.compiler/share/classes/com/sun/tools/javac/util/GraphUtils.java line 254:
> 252:
> 253: protected String formatProperties(Properties p) {
> 254: return p.toString().replace(',', ' ')
can't there be more than one `,` in the `toString` of `Properties` object?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23658#discussion_r1967481347
More information about the compiler-dev
mailing list