Skip to content

Commit

Permalink
Use replace instead of replaceAll for string replacement (regexp not …
Browse files Browse the repository at this point in the history
…needed) (helidon-io#9448)

Signed-off-by: Tomas Langer <[email protected]>
  • Loading branch information
tomas-langer authored and barchetta committed Nov 4, 2024
1 parent 1270f2e commit 5cf303e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,8 @@ static String escapeName(String name) {
* @return unescaped name
*/
static String unescapeName(String escapedName) {
return escapedName.replaceAll("~1", ".")
.replaceAll("~0", "~");
return escapedName.replace("~1", ".")
.replace("~0", "~");
}

/**
Expand Down
4 changes: 2 additions & 2 deletions config/config/src/main/java/io/helidon/config/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -1020,8 +1020,8 @@ static String escapeName(String name) {
* @return unescaped name
*/
static String unescapeName(String escapedName) {
return escapedName.replaceAll("~1", ".")
.replaceAll("~0", "~");
return escapedName.replace("~1", ".")
.replace("~0", "~");
}
}

Expand Down

0 comments on commit 5cf303e

Please sign in to comment.