Skip to content

Commit

Permalink
Fix npe in JavaTypeMixin (cashapp#2603)
Browse files Browse the repository at this point in the history
  • Loading branch information
aperfilyev authored and Satook committed Mar 21, 2022
1 parent 6300c90 commit 9756f68
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 9756f68

Please sign in to comment.