RFR: 8349991: GraphUtils.java can use String.replace() instead of String.replaceAll()

Archie Cobbs acobbs at openjdk.org
Mon Feb 17 02:43:36 UTC 2025


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.

-------------

Commit messages:
 - Simplify invocations of replaceAll() where replace() would work.

Changes: https://git.openjdk.org/jdk/pull/23658/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23658&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8349991
  Stats: 4 lines in 1 file changed: 0 ins; 0 del; 4 mod
  Patch: https://git.openjdk.org/jdk/pull/23658.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/23658/head:pull/23658

PR: https://git.openjdk.org/jdk/pull/23658


More information about the compiler-dev mailing list