Github user srowen commented on the issue:
https://github.com/apache/spark/pull/21456
I believe this would work, if the goal is simply to squash repeated slashes
into one:
```
private static final Pattern MULTIPLE_SEPARATORS =
Pattern.compile(File.separator + "{2,}");
private static String createNormalizedInternedPathname(String dir1, String
dir2, String fname) {
Matcher m = MULTIPLE_SEPARATORS.matcher(dir1 + File.separator + dir2 +
File.separator + fname);
return m.replaceAll("/").intern();
}
```
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]