tiny performance fix

GitOrigin-RevId: 5574e211e66f2d3e1aa08c0b3cc58117586e777f
This commit is contained in:
Alexey Kudravtsev
2019-07-02 06:52:16 +03:00
committed by intellij-monorepo-bot
parent 0aee882f3d
commit b80bd6abc6
@@ -235,7 +235,9 @@ public class FileUtilRt {
}
}
path = path.replace(separatorChar, '/');
if (separatorChar != '/') {
path = path.replace(separatorChar, '/');
}
// trying to speedup the common case when there are no "//" or "/."
int index = -1;
do {
@@ -304,7 +306,6 @@ public class FileUtilRt {
return result.toString();
}
@SuppressWarnings("DuplicatedCode")
private static int processRoot(@NotNull String path, @NotNull Appendable result) {
try {
if (SystemInfoRt.isWindows && path.length() > 1 && path.charAt(0) == '/' && path.charAt(1) == '/') {