Java: Check reflection calls - cleanup upon review (IDEA-CR-20616, IDEA-172003)

This commit is contained in:
Pavel Dolgov
2017-05-30 13:34:32 +03:00
parent 21cbbbfc65
commit adb5d93cee
2 changed files with 14 additions and 28 deletions
@@ -43,11 +43,19 @@ class Vararg {
myB = Class.forName("B");
}
final Class<?> myB1;
Vararg(int n) throws Exception {
Object bb = Array.newInstance(myB, n);
Class<?> bc = bb.getClass();
ourA.getConstructor(bc);
ourA.getMethod("bar", String.class, bc);
myB1 = B.class;
}
void foo1() {
ourA.getMethod("bar", myB1);
ourA.getMethod(<warning descr="Cannot resolve method 'bar' with specified argument types">"bar"</warning>, myB1, String.class);
}
}