mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
SSR: fix AIOOBE when pattern did not produce any psi elements (IDEA-204490)
GitOrigin-RevId: ea34764a7a5d5bdb26fa7d4029f60a360a6e22a2
This commit is contained in:
committed by
intellij-monorepo-bot
parent
5aca92658b
commit
f5ee1db0b8
+4
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.structuralsearch.impl.matcher.compiler;
|
||||
|
||||
import com.intellij.dupLocator.util.NodeFilter;
|
||||
@@ -116,6 +116,9 @@ public class GlobalCompilingVisitor {
|
||||
}
|
||||
|
||||
void compile(PsiElement[] elements, CompileContext context) {
|
||||
if (elements.length == 0) {
|
||||
throw new MalformedPatternException();
|
||||
}
|
||||
myCodeBlockLevel = 0;
|
||||
this.context = context;
|
||||
final StructuralSearchProfile profile = StructuralSearchUtil.getProfileByFileType(context.getOptions().getFileType());
|
||||
|
||||
Reference in New Issue
Block a user