[java-completion] IDEA-385709 ArrayIndexOutOfBoundsException when deconstruction components are more than record components

- clean-uo

GitOrigin-RevId: 6f2ee59e3a41b1d9538814078fd319241b9028b5
This commit is contained in:
Mikhail Pyltsin
2026-02-09 17:05:04 +01:00
committed by intellij-monorepo-bot
parent 535279c971
commit 8601ac6b7e

View File

@@ -187,7 +187,6 @@ public final class JavaPatternCompletionUtil {
@NotNull List<PsiType> types,
boolean onlyDeconstructionList) {
static PatternModel create(@NotNull PsiClass record, @NotNull PsiElement context, boolean onlyDeconstructionList) {
JavaCodeStyleManager manager = JavaCodeStyleManager.getInstance(record.getProject());
PsiDeconstructionPattern deconstructionPattern = PsiTreeUtil.getParentOfType(context, PsiDeconstructionPattern.class);
List<String> names = new ArrayList<>();
for (PsiRecordComponent component : record.getRecordComponents()) {