make method static: warn about broken method references if filed or class need to be passed; NPE (EA-66661 - NPE: MakeMethodStaticProcessor.changeExternalUsage)

This commit is contained in:
Anna Kozlova
2015-03-23 20:24:20 +01:00
parent 7a0e5f9426
commit d18781b365
4 changed files with 26 additions and 2 deletions

View File

@@ -0,0 +1,10 @@
class Test4 {
void test() {
Runnable f = Test4::yyy;
}
String myField = "";
static void yyy() {
System.out.println(myField);
}
}

View File

@@ -0,0 +1,10 @@
class Test4 {
void test() {
Runnable f = this::yyy;
}
String myField = "";
void yy<caret>y() {
System.out.println(myField);
}
}