mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
type parameters should not cause deprecated constructor warning to appear (IDEA-124689)
This commit is contained in:
+1
@@ -189,6 +189,7 @@ public class DeprecationInspection extends BaseJavaBatchLocalInspectionTool {
|
||||
|
||||
@Override
|
||||
public void visitClass(PsiClass aClass) {
|
||||
if (aClass instanceof PsiTypeParameter) return;
|
||||
final PsiMethod[] currentConstructors = aClass.getConstructors();
|
||||
if (currentConstructors.length == 0) {
|
||||
final PsiClass superClass = aClass.getSuperClass();
|
||||
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<problems/>
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
class Test {
|
||||
@Deprecated
|
||||
protected Test() { }
|
||||
|
||||
static <T extends Test> void foo() {}
|
||||
}
|
||||
@@ -49,4 +49,8 @@ public class DeprecationInspectionTest extends InspectionTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testDeprecatedDefaultConstructorFromTypeParameter() throws Exception {
|
||||
doTest();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user