Java: Improved inspection "MethodHandle/VarHandle type mismatch" - show candidates for replacement of method/constructor in a separate pop-up menu (IDEA-167318)

This commit is contained in:
Pavel Dolgov
2017-03-16 15:28:53 +03:00
parent 741b74a23a
commit d81332e1f8
60 changed files with 268 additions and 105 deletions

View File

@@ -0,0 +1,13 @@
// "Replace with 'findSetter'" "true"
import java.lang.invoke.*;
public class Main {
void foo() throws Throwable {
MethodHandles.Lookup lookup = MethodHandles.lookup();
lookup.<caret>findStaticSetter(Test.class, "myInt", int.class);
}
}
class Test {
public int myInt;
}