mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
extract method: don't search for the valid place to insert empty method when nullability state is calculated and containing class is not physical and used as a context only (IDEA-146102)
This commit is contained in:
+1
-1
@@ -640,7 +640,7 @@ public class ExtractMethodProcessor implements MatchProvider {
|
||||
if (classCopy == null) {
|
||||
return null;
|
||||
}
|
||||
final PsiMethod emptyMethod = (PsiMethod)classCopy.add(generateEmptyMethod("name"));
|
||||
final PsiMethod emptyMethod = (PsiMethod)classCopy.addAfter(generateEmptyMethod("name"), PsiTreeUtil.getParentOfType(classCopy, PsiMember.class));
|
||||
prepareMethodBody(emptyMethod, false);
|
||||
if (myNotNullConditionalCheck || myNullConditionalCheck) {
|
||||
return Nullness.NULLABLE;
|
||||
|
||||
Reference in New Issue
Block a user