remove duplicated check

This commit is contained in:
Anna Kozlova
2017-05-31 12:29:17 +03:00
parent 00e6afd5e3
commit 1966d0df2a
@@ -626,12 +626,6 @@ public abstract class IntroduceVariableBase extends IntroduceHandlerBase {
return false;
}
if(!NotInSuperCallOccurrenceFilter.INSTANCE.isOK(expr)) {
String message = RefactoringBundle.getCannotRefactorMessage(RefactoringBundle.message("cannot.introduce.variable.in.super.constructor.call"));
showErrorMessage(project, editor, message);
return false;
}
final PsiFile file = anchorStatement.getContainingFile();
LOG.assertTrue(file != null, "expr.getContainingFile() == null");
final PsiElement nameSuggestionContext = editor == null ? null : file.findElementAt(editor.getCaretModel().getOffset());