mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
disable unchecked generics array creation in varargs when corresponding fake inspection is disabled
This commit is contained in:
+2
@@ -1114,6 +1114,8 @@ public class GenericsHighlightUtil {
|
||||
|
||||
@Nullable
|
||||
public static HighlightInfo checkUncheckedGenericsArrayCreation(PsiJavaCodeReferenceElement referenceExpression, PsiElement resolved){
|
||||
final HighlightDisplayKey key = HighlightDisplayKey.find(UncheckedWarningLocalInspection.SHORT_NAME);
|
||||
if (!InspectionProjectProfileManager.getInstance(referenceExpression.getProject()).getInspectionProfile().isToolEnabled(key, referenceExpression)) return null;
|
||||
if (isUncheckedWarning(referenceExpression, resolved, false)) {
|
||||
final HighlightInfo highlightInfo =
|
||||
HighlightInfo.createHighlightInfo(HighlightInfoType.WARNING, referenceExpression, "Unchecked generics array creation for varargs parameter");
|
||||
|
||||
Reference in New Issue
Block a user