mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-26 19:06:24 +07:00
do not warn about default deprecated constructor for anonymous classes which use non-deprecated constructors
This commit is contained in:
+5
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -150,6 +150,10 @@ public class DeprecationInspection extends BaseJavaLocalInspectionTool {
|
||||
assert containingClass != null;
|
||||
final PsiClass superClass = containingClass.getSuperClass();
|
||||
if (hasDefaultDeprecatedConstructor(superClass)) {
|
||||
if (superClass instanceof PsiAnonymousClass) {
|
||||
final PsiExpressionList argumentList = ((PsiAnonymousClass)superClass).getArgumentList();
|
||||
if (argumentList != null && argumentList.getExpressions().length > 0) return;
|
||||
}
|
||||
final PsiCodeBlock body = method.getBody();
|
||||
if (body != null) {
|
||||
final PsiStatement[] statements = body.getStatements();
|
||||
|
||||
Reference in New Issue
Block a user