mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Java: Fixed modifiers when extracting method from default or private method in interface (IDEA-211141)
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
public interface FromDefaultMethodInInterface {
|
||||
default void test(String a, String b) {
|
||||
<selection>
|
||||
String c = a + b;
|
||||
System.out.println(c);
|
||||
</selection>
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
public interface FromDefaultMethodInInterface {
|
||||
default void test(String a, String b) {
|
||||
|
||||
newMethod(a, b);
|
||||
|
||||
}
|
||||
|
||||
private void newMethod(String a, String b) {
|
||||
String c = a + b;
|
||||
System.out.println(c);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
public interface FromPrivateMethodInInterface {
|
||||
private void test(String a, String b) {
|
||||
<selection>
|
||||
String c = a + b;
|
||||
System.out.println(c);
|
||||
</selection>
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
public interface FromPrivateMethodInInterface {
|
||||
private void test(String a, String b) {
|
||||
|
||||
newMethod(a, b);
|
||||
|
||||
}
|
||||
|
||||
private void newMethod(String a, String b) {
|
||||
String c = a + b;
|
||||
System.out.println(c);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
public interface FromStaticMethodInInterface {
|
||||
static void test(String a, String b) {
|
||||
<selection>
|
||||
String c = a + b;
|
||||
System.out.println(c);
|
||||
</selection>
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
public interface FromStaticMethodInInterface {
|
||||
static void test(String a, String b) {
|
||||
|
||||
newMethod(a, b);
|
||||
|
||||
}
|
||||
|
||||
static void newMethod(String a, String b) {
|
||||
String c = a + b;
|
||||
System.out.println(c);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user