Skip to content

Commit

Permalink
Fix npe in JavaTypeMixin (#2603)
Browse files Browse the repository at this point in the history
Closes #2542
  • Loading branch information
aperfilyev authored and AlecKazakova committed Nov 23, 2021
1 parent 9f905c0 commit fa034de
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ abstract class JavaTypeMixin(
?.javaType?.text?.plus(text.removePrefix(prefix)) ?: typeForThisPackage(text)
}

val module = findModuleForPsiElement(element) ?: return null
return JavaPsiFacade.getInstance(project).findClass(
qualifiedType,
findModuleForPsiElement(element)!!.getModuleWithDependenciesAndLibrariesScope(false)
module.getModuleWithDependenciesAndLibrariesScope(false)
)
}

Expand Down

0 comments on commit fa034de

Please sign in to comment.