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) (#9448)

Signed-off-by: Tomas Langer <[email protected]>
  • Loading branch information
tomas-langer authored Oct 31, 2024
1 parent e57bfad commit d778f3b
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 d778f3b

Please sign in to comment.