From a3188e0406bcd69468de0444038525d3d069699f Mon Sep 17 00:00:00 2001 From: Archie Cobbs Date: Tue, 25 Feb 2025 19:39:00 +0000 Subject: [PATCH] 8349991: GraphUtils.java can use String.replace() instead of String.replaceAll() Reviewed-by: mcimadamore --- .../classes/com/sun/tools/javac/util/GraphUtils.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/GraphUtils.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/GraphUtils.java index 3d0aab4b010..8620caf3ee5 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/GraphUtils.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/GraphUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -251,9 +251,9 @@ public class GraphUtils { } protected String formatProperties(Properties p) { - return p.toString().replaceAll(",", " ") - .replaceAll("\\{", "[") - .replaceAll("\\}", "]"); + return p.toString().replace(',', ' ') + .replace('{', '[') + .replace('}', ']'); } protected static String wrap(String s) {