On Sat, 8 Mar 2025 00:28:15 GMT, Henry Jen <henry...@openjdk.org> wrote:

> JDK-8349989: jlink can use String.replace instead of String.replaceAll

src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ImageResourcesTree.java 
line 303:

> 301:             }
> 302:             String pkg = removeRadical(path, module + "/");
> 303:             return pkg.replace("/", ".");

With the conversion to `replace`, we can use the char literals `'/'` and `'.'` 
instead of the string literals, which gives better performance as well.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23954#discussion_r1986384292

Reply via email to