[surrounder] Surrounder.surroundElements: remove declared unchecked exception (unnecessary and rarely thrown anyway)

GitOrigin-RevId: c8122acc2c3ee0d2bf78c70efb5525c54020fe70
This commit is contained in:
Tagir Valeev
2024-06-19 16:00:49 +02:00
committed by intellij-monorepo-bot
parent 5b4e5db8b5
commit be91af43bb
11 changed files with 11 additions and 21 deletions

View File

@@ -28,7 +28,6 @@ import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiFile;
import com.intellij.psi.PsiFileFactory;
import com.intellij.psi.util.PsiTreeUtil;
import com.intellij.util.IncorrectOperationException;
import org.intellij.lang.regexp.RegExpFileType;
import org.intellij.lang.regexp.psi.RegExpAtom;
import org.intellij.lang.regexp.psi.RegExpPattern;
@@ -57,7 +56,7 @@ class GroupSurrounder implements Surrounder {
@Override
@Nullable
public TextRange surroundElements(@NotNull Project project, @NotNull Editor editor, PsiElement @NotNull [] elements) throws IncorrectOperationException {
public TextRange surroundElements(@NotNull Project project, @NotNull Editor editor, PsiElement @NotNull [] elements) {
assert elements.length == 1 || PsiTreeUtil.findCommonParent(elements) == elements[0].getParent();
final PsiElement e = elements[0];
final ASTNode node = e.getNode();