IDEA-136406 Complete current statement doesn't insert a method body for default metho...
[idea/community.git] / java / java-impl / src / com / intellij / codeInsight / editorActions / smartEnter / SemicolonFixer.java
index fd78db19f78283d39190243ad3b0be861b9ba700..c43c02b2246dac9c36306fb198de9dbd30aa7bfa 100644 (file)
@@ -102,8 +102,7 @@ public class SemicolonFixer implements Fixer {
         !(psiElement instanceof PsiAssertStatement) &&
         !(psiElement instanceof PsiPackageStatement) &&
         (!(psiElement instanceof PsiField) || psiElement instanceof PsiEnumConstant) &&
-        (!(psiElement instanceof PsiMethod) || (!((PsiMethod)psiElement).getContainingClass().isInterface() &&
-                                                !((PsiMethod)psiElement).hasModifierProperty(PsiModifier.ABSTRACT)))) {
+        (!(psiElement instanceof PsiMethod) || ((PsiMethod)psiElement).getBody() != null || MissingMethodBodyFixer.shouldHaveBody((PsiMethod)psiElement))) {
       return false;
     }
     String text = psiElement.getText();