void (PsiMethod method, PsiIdentifier nameIdentifier) { final LocalQuickFix quickFix; if (GenericsHighlightUtil.isSafeVarargsNoOverridingCondition(method, PsiUtil.getLanguageLevel(method))) { quickFix = new AnnotateAsSafeVarargsQuickFix(false); } else { final PsiClass containingClass = method.getContainingClass(); LOG.assertTrue(containingClass != null); boolean canBeFinal = !method.hasModifierProperty(PsiModifier.ABSTRACT) && !containingClass.isInterface() && OverridingMethodsSearch.search(method).findFirst() == null; quickFix = canBeFinal ? new AnnotateAsSafeVarargsQuickFix(true) : null; } myHolder.registerProblem(nameIdentifier, JavaAnalysisBundle.message("possible.heap.pollution.from.parameterized.vararg.type.loc"), LocalQuickFix.notNullElements(quickFix)); }