void (PsiVariable variable, PsiVariable copyVariable, PsiTypeElement element2Highlight) { ArrayList<PsiAnnotation> typeUseAnnotations = new ArrayList<>(); AnnotationTargetUtil.collectStrictlyTypeUseAnnotations(copyVariable.getModifierList(), typeUseAnnotations); if (!typeUseAnnotations.isEmpty()) return; PsiTypeElement typeElementCopy = copyVariable.getTypeElement(); if (typeElementCopy != null) { IntroduceVariableUtil.expandDiamondsAndReplaceExplicitTypeWithVar(typeElementCopy, variable); if (variable.getType().equals(getNormalizedType(copyVariable))) { holder.registerProblem(element2Highlight, InspectionGadgetsBundle.message("inspection.redundant.explicit.variable.type.description"), new ReplaceWithVarFix()); } } }