mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 15:09:39 +07:00
EA-20331 - NPE: JavaSmartEnterProcessor.reformat
Check for null is introduced
This commit is contained in:
@@ -154,6 +154,9 @@ public class JavaSmartEnterProcessor extends SmartEnterProcessor {
|
||||
|
||||
@Override
|
||||
protected void reformat(PsiElement atCaret) throws IncorrectOperationException {
|
||||
if (atCaret == null) {
|
||||
return;
|
||||
}
|
||||
PsiElement parent = atCaret.getParent();
|
||||
if (parent instanceof PsiCodeBlock) {
|
||||
final PsiCodeBlock block = (PsiCodeBlock) parent;
|
||||
|
||||
Reference in New Issue
Block a user