Commit a18c3e6
perf: optimize replaceFirst with literal indexOf in TestFolderPathPattern
Replaced expensive regex `String.replaceFirst()` operations with literal `String.indexOf` and `String.substring` in `TestFolderPathPattern.java` for variable replacements. This avoids regex compilation and execution overhead and prevents `IllegalArgumentException` when the substitution target contains literal regex characters like `$`. Also removed obsolete `quoteReplacement` escaping calls that are no longer necessary for literal substring concatenation.
Co-authored-by: RoiSoleil <3462260+RoiSoleil@users.noreply.github.com>1 parent c8b1ce8 commit a18c3e6
2 files changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | | - | |
| 200 | + | |
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
| |||
0 commit comments