In src/main/java/org/apache/maven/shared/filtering/FilteringUtils.java, lines 81–100:
The regex ^(.*)[a-zA-Z]:\\\\\\(.*) only matches absolute Windows paths containing a drive letter. Relative paths with backslashes (e.g., src\\main\\java) are never escaped. The single/double backslash deduplication logic at line 90 (if (val.indexOf('\\', end + 1) == end + 1)) also means that C:\\foo\\bar and C:\\foo\\\\bar both produce the same output C:\\\\\\\\foo\\\\\\\\bar — information is lost about whether the original had single or double backslashes.
In
src/main/java/org/apache/maven/shared/filtering/FilteringUtils.java, lines 81–100:The regex
^(.*)[a-zA-Z]:\\\\\\(.*)only matches absolute Windows paths containing a drive letter. Relative paths with backslashes (e.g.,src\\main\\java) are never escaped. The single/double backslash deduplication logic at line 90 (if (val.indexOf('\\', end + 1) == end + 1)) also means thatC:\\foo\\barandC:\\foo\\\\barboth produce the same outputC:\\\\\\\\foo\\\\\\\\bar— information is lost about whether the original had single or double backslashes.