mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-10 13:17:09 +07:00
convert static method to instance method of the same class without corresponding parameter (IDEA-64834)
This commit is contained in:
+26
@@ -0,0 +1,26 @@
|
||||
|
||||
class Bar {
|
||||
static void f<caret>oo() {
|
||||
}
|
||||
|
||||
void m(){
|
||||
Bar.foo();
|
||||
}
|
||||
|
||||
{
|
||||
Runnable r = Bar::foo;
|
||||
}
|
||||
|
||||
static {
|
||||
Runnable r = Bar::foo;
|
||||
}
|
||||
}
|
||||
|
||||
class Bar1 {
|
||||
void m() {
|
||||
Bar.foo();
|
||||
}
|
||||
{
|
||||
Runnable r = Bar::foo;
|
||||
}
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
|
||||
class Bar {
|
||||
void foo() {
|
||||
}
|
||||
|
||||
void m(){
|
||||
foo();
|
||||
}
|
||||
|
||||
{
|
||||
Runnable r = this::foo;
|
||||
}
|
||||
|
||||
static {
|
||||
Runnable r = new Bar()::foo;
|
||||
}
|
||||
}
|
||||
|
||||
class Bar1 {
|
||||
void m() {
|
||||
new Bar().foo();
|
||||
}
|
||||
{
|
||||
Runnable r = new Bar()::foo;
|
||||
}
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
|
||||
class Bar<T> {
|
||||
static void f<caret>oo() {
|
||||
}
|
||||
|
||||
void m(){
|
||||
Bar.foo();
|
||||
}
|
||||
|
||||
{
|
||||
Runnable r = Bar::foo;
|
||||
}
|
||||
|
||||
static {
|
||||
Runnable r = Bar::foo;
|
||||
}
|
||||
}
|
||||
|
||||
class Bar1 {
|
||||
void m() {
|
||||
Bar.foo();
|
||||
}
|
||||
{
|
||||
Runnable r = Bar::foo;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user