mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
unchecked warning (IDEA-99357)
This commit is contained in:
+1
@@ -437,6 +437,7 @@ public class UncheckedWarningLocalInspection extends BaseJavaLocalInspectionTool
|
||||
public Boolean visitClassType(PsiClassType classType) {
|
||||
PsiClass psiClass = classType.resolve();
|
||||
if (psiClass instanceof PsiTypeParameter) {
|
||||
if (((PsiTypeParameter)psiClass).getOwner() == method) return Boolean.FALSE;
|
||||
return substitutor.substitute((PsiTypeParameter)psiClass) == null ? Boolean.TRUE : Boolean.FALSE;
|
||||
}
|
||||
PsiType[] parameters = classType.getParameters();
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
class Test {
|
||||
public static void main(String[] args) {
|
||||
Foo f = new Foo();
|
||||
System.out.println(f.get());
|
||||
}
|
||||
}
|
||||
|
||||
class Foo<<warning descr="Type parameter 'T' is never used">T</warning>> {
|
||||
public <T1> T1 get() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+1
@@ -158,6 +158,7 @@ public class LightAdvHighlightingJdk7Test extends LightDaemonAnalyzerTestCase {
|
||||
public void testUncheckedWarningIDEA70620() throws Exception { doTest(true, false); }
|
||||
public void testUncheckedWarningIDEA60166() throws Exception { doTest(true, false); }
|
||||
public void testUncheckedWarningIDEA21432() throws Exception { doTest(true, false); }
|
||||
public void testUncheckedWarningIDEA99357() throws Exception { doTest(true, false); }
|
||||
public void testUncheckedWarningIDEA26738() throws Exception { doTest(true, false); }
|
||||
public void testDefaultMethodVisibility() throws Exception { doTest(true, false); }
|
||||
public void testInheritUnrelatedDefaults() throws Exception { doTest(true, false); }
|
||||
|
||||
Reference in New Issue
Block a user