Check for file validity before calling findFileByRelativePath() (EA-92325 - IVFAE: VirtualDirectoryImpl.doFindChild)
This commit is contained in:
+1
-1
@@ -56,7 +56,7 @@ class ScriptDependencySourceNavigationPolicyForJavaClasses : ClsCustomNavigation
|
|||||||
val packageName = file.packageName
|
val packageName = file.packageName
|
||||||
val relativePath = if (packageName.isEmpty()) sourceFileName else packageName.replace('.', '/') + '/' + sourceFileName
|
val relativePath = if (packageName.isEmpty()) sourceFileName else packageName.replace('.', '/') + '/' + sourceFileName
|
||||||
|
|
||||||
for (root in kotlinScriptConfigurationManager.getAllLibrarySources()) {
|
for (root in kotlinScriptConfigurationManager.getAllLibrarySources().filter { it.isValid }) {
|
||||||
val sourceFile = root.findFileByRelativePath(relativePath)
|
val sourceFile = root.findFileByRelativePath(relativePath)
|
||||||
if (sourceFile != null && sourceFile.isValid) {
|
if (sourceFile != null && sourceFile.isValid) {
|
||||||
val sourcePsi = file.manager.findFile(sourceFile)
|
val sourcePsi = file.manager.findFile(sourceFile)
|
||||||
|
|||||||
Reference in New Issue
Block a user