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 Sep 30, 2021
1 parent b001bf8 commit 139297d
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 139297d

Please sign in to comment.