[JPS] Don't use non-optimal Files.exist() in JPS context check on dry start-up
After moving JPS from the IJ repo back to the Kotlin repo, some file operations were accidentally changed to non-optimal ones. #KTIJ-21161 Fixed
This commit is contained in:
committed by
Space Team
parent
772745b0ad
commit
57da858810
@@ -28,7 +28,7 @@ class CacheVersionManager(
|
||||
else CacheVersion(expectedOwnVersion, JvmBytecodeBinaryVersion.INSTANCE, JvmMetadataVersion.INSTANCE)
|
||||
|
||||
override fun loadActual(): CacheVersion? =
|
||||
if (Files.notExists(versionFile)) null
|
||||
if (!versionFile.toFile().exists()) null
|
||||
else try {
|
||||
CacheVersion(Files.newInputStream(versionFile).bufferedReader().use { it.readText() }.toInt())
|
||||
} catch (e: NumberFormatException) {
|
||||
|
||||
Reference in New Issue
Block a user