Path hash code is case-agnostic. This is to avoid changing it if e.g. path to project is reconfigured from C:\Work to c:\work

This commit is contained in:
Evgeny Gerashchenko
2015-06-08 19:37:34 +03:00
parent 959364aa77
commit c48378260e
7 changed files with 21 additions and 6 deletions
@@ -41,10 +41,7 @@ import static org.jetbrains.kotlin.load.kotlin.PackageClassUtils.getPackageClass
public class PackagePartClassUtils {
public static int getPathHashCode(@NotNull VirtualFile file) {
// Conversion to system-dependent name seems to be unnecessary, but it's hard to check now:
// it was introduced when fixing KT-2839, which appeared again (KT-3639).
// If you try to remove it, run tests on Windows.
return FileUtil.toSystemDependentName(file.getPath()).hashCode();
return file.getPath().toLowerCase().hashCode();
}
@NotNull