mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
Inline inner: check when possible to inline this ref only (IDEA-39274)
This commit is contained in:
+7
@@ -0,0 +1,7 @@
|
||||
public class Simple {}
|
||||
|
||||
class Usage {
|
||||
void foo() {
|
||||
String s = new Si<caret>mple().toString();
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
public class Simple implements Runnable {
|
||||
public void run(){}
|
||||
}
|
||||
|
||||
class Usage {
|
||||
void foo() {
|
||||
bar(new Si<caret>mple());
|
||||
}
|
||||
|
||||
void bar(Runnable r){}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
public class Simple<T> implements Comparable<T> {
|
||||
public int compareTo(T o){}
|
||||
}
|
||||
|
||||
class Usage {
|
||||
void foo() {
|
||||
bar(new Si<caret>mple<String>());
|
||||
}
|
||||
|
||||
void bar(Comparable<String>... r){}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
public class Simple<T> implements Comparable<T> {
|
||||
public int compareTo(T o){}
|
||||
}
|
||||
|
||||
class Usage<S> {
|
||||
void foo() {
|
||||
bar(new Si<caret>mple<S>());
|
||||
}
|
||||
|
||||
void bar(Comparable<S>... r){}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
public class Simple {}
|
||||
|
||||
class Usage {
|
||||
void foo() {
|
||||
synchronized (new Si<caret>mple()) {
|
||||
//dosmth
|
||||
}
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
public class Simple implements Runnable {
|
||||
public void run(){}
|
||||
}
|
||||
|
||||
class Usage {
|
||||
void foo() {
|
||||
bar(new Si<caret>mple());
|
||||
}
|
||||
|
||||
void bar(Runnable... r){}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
public class Simple {}
|
||||
|
||||
class Usage {
|
||||
void foo() {
|
||||
Simple s = new Si<caret>mple();
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
public class Simple implements Runnable {
|
||||
public void run(){}
|
||||
}
|
||||
|
||||
class Usage {
|
||||
void foo() {
|
||||
bar(new Si<caret>mple());
|
||||
}
|
||||
|
||||
void bar(Simple s){}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
public class Simple {}
|
||||
|
||||
class Usage {
|
||||
Simple foo() {
|
||||
return new Si<caret>mple();
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Simple extends Exception{}
|
||||
|
||||
class Usage {
|
||||
void foo() throws Simple {
|
||||
throw new Si<caret>mple();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user