tests fix

This commit is contained in:
Alexey Kudravtsev
2011-05-23 13:35:03 +04:00
parent ecd307e4f4
commit 444594e90c
5 changed files with 58 additions and 7 deletions
@@ -34,7 +34,6 @@ class C {
public static void main(String[] args) {
final TestProcessor testProcessor = new TestProcessor();
testProcessor.processMap(<warning descr="Unchecked assignment: 'java.util.HashMap' to 'java.util.Map<java.lang.String,java.lang.String>'">new HashMap()</warning>);
// ^^^ to cdr: should resolve to TestProcessor.processMap() (at UncheckedWarningLocalInspection.java:228)
testProcessor.processMap(new HashMap());
}
}
@@ -0,0 +1,17 @@
class TestClassT {
static {
new B().<ref>foo(TestClassT.class);
}
public static class A {
public A foo(Class<?> type) {
return new A();
}
}
public static class B extends A {
@Override
public B foo(Class type) {
return new B();
}
}
}
@@ -0,0 +1,21 @@
import java.util.*;
class C {
public static interface GenericAgnosticProcessor {
void processMap(Map map);
}
public static interface GenericAwareProcessor {
void processMap(Map<String, String> map);
}
public static class TestProcessor implements GenericAwareProcessor, GenericAgnosticProcessor {
@Override
public void processMap(Map map) { }
}
public static void main(String[] args) {
final TestProcessor testProcessor = new TestProcessor();
testProcessor.<ref>processMap(new HashMap());
}
}