mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
delegate default param values: don't mark static method in the interface with default modifier (IDEA-148489)
This commit is contained in:
+2
-1
@@ -87,8 +87,9 @@ public class DelegateWithDefaultParamValueIntentionAction extends PsiElementBase
|
||||
prototype.getModifierList().setModifierProperty(PsiModifier.ABSTRACT, false);
|
||||
prototype.addBefore(emptyBody, null);
|
||||
}
|
||||
|
||||
final PsiClass aClass = method.getContainingClass();
|
||||
if (aClass != null && aClass.isInterface()) {
|
||||
if (aClass != null && aClass.isInterface() && !method.hasModifierProperty(PsiModifier.STATIC)) {
|
||||
prototype.getModifierList().setModifierProperty(PsiModifier.DEFAULT, true);
|
||||
}
|
||||
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Generate overloaded method with default parameter value" "true"
|
||||
interface Test {
|
||||
static void foo() {
|
||||
foo();
|
||||
}
|
||||
|
||||
static void foo(int ii) {}
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// "Generate overloaded method with default parameter value" "true"
|
||||
interface Test {
|
||||
static void foo(int i<caret>i) {}
|
||||
}
|
||||
Reference in New Issue
Block a user