mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
inline this() as method inside the constructor for non chained constructors (IDEA-87111)
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
public class InlineThis {
|
||||
public InlineThis() {
|
||||
System.out.println("code block here");
|
||||
}
|
||||
|
||||
public InlineThis(int i) {
|
||||
th<caret>is();
|
||||
}
|
||||
|
||||
public InlineThis(String str) {
|
||||
this(Integer.parseInt(str));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
InlineThis aInlineThis = new InlineThis();
|
||||
InlineThis aInlineThis1 = new InlineThis(1);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
public class InlineThis {
|
||||
public InlineThis() {
|
||||
System.out.println("code block here");
|
||||
}
|
||||
|
||||
public InlineThis(int i) {
|
||||
System.out.println("code block here");
|
||||
}
|
||||
|
||||
public InlineThis(String str) {
|
||||
this(Integer.parseInt(str));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
InlineThis aInlineThis = new InlineThis();
|
||||
InlineThis aInlineThis1 = new InlineThis(1);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
public class InlineThis {
|
||||
public InlineThis() {
|
||||
System.out.println("code block here");
|
||||
}
|
||||
|
||||
public InlineThis(int i) {
|
||||
this();
|
||||
}
|
||||
|
||||
public InlineThis(String str) {
|
||||
th<caret>is(Integer.parseInt(str));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
InlineThis aInlineThis = new InlineThis();
|
||||
InlineThis aInlineThis1 = new InlineThis(1);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
public class InlineThis {
|
||||
public InlineThis() {
|
||||
System.out.println("code block here");
|
||||
}
|
||||
|
||||
public InlineThis(String str) {
|
||||
this();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
InlineThis aInlineThis = new InlineThis();
|
||||
InlineThis aInlineThis1 = new InlineThis();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user