Don't crash when trying to build stubs for files that have been deleted
Fixes EA-97751
This commit is contained in:
+5
@@ -50,6 +50,11 @@ fun isKotlinWithCompatibleAbiVersion(file: VirtualFile): Boolean {
|
||||
* which should NOT be decompiled (and, as a result, shown under the library in the Project view, be searchable via Find class, etc.)
|
||||
*/
|
||||
fun isKotlinInternalCompiledFile(file: VirtualFile, fileContent: ByteArray? = null): Boolean {
|
||||
// Don't crash on invalid files (EA-97751)
|
||||
if (!file.isValid || fileContent?.size == 0) {
|
||||
return false
|
||||
}
|
||||
|
||||
if (!IDEKotlinBinaryClassCache.isKotlinJvmCompiledFile(file, fileContent)) {
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user