[java-inspections] Use LocalRefUseInfo in more contexts to avoid extra PSI traversals

GitOrigin-RevId: 0dae53843eebe7232460cad1c809223342824cd2
This commit is contained in:
Tagir Valeev
2024-03-19 12:19:52 +01:00
committed by intellij-monorepo-bot
parent 4e988bff4c
commit aed276dfd3
19 changed files with 99 additions and 67 deletions

View File

@@ -306,6 +306,7 @@ public final class PsiUtil extends PsiUtilCore {
* @return topmost code block where variable makes sense
*/
@Nullable
@Contract(pure = true)
public static PsiElement getVariableCodeBlock(@NotNull PsiVariable variable, @Nullable PsiElement context) {
PsiElement codeBlock = null;
if (variable instanceof PsiParameter) {