Exist if no identifier found (EA-91332)
This commit is contained in:
@@ -64,7 +64,10 @@ abstract class KtNamedDeclarationNotStubbed extends KtDeclarationImpl implements
|
||||
|
||||
@Override
|
||||
public PsiElement setName(@NonNls @NotNull String name) throws IncorrectOperationException {
|
||||
return getNameIdentifier().replace(KtPsiFactory(this).createNameIdentifier(name));
|
||||
PsiElement identifier = getNameIdentifier();
|
||||
if (identifier == null) throw new IncorrectOperationException();
|
||||
|
||||
return identifier.replace(KtPsiFactory(this).createNameIdentifier(name));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user