mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
AIOOBE for groovy (IDEA-141775)
This commit is contained in:
+3
@@ -134,6 +134,9 @@ public class ExtractLightMethodObjectHandler {
|
||||
final PsiElement[] elementsCopy = CodeInsightUtil.findStatementsInRange(copy,
|
||||
firstElementCopy.getTextRange().getStartOffset(),
|
||||
anchor.getTextRange().getStartOffset());
|
||||
if (elementsCopy.length == 0) {
|
||||
return null;
|
||||
}
|
||||
if (elementsCopy[elementsCopy.length - 1] instanceof PsiExpressionStatement) {
|
||||
final PsiExpression expr = ((PsiExpressionStatement)elementsCopy[elementsCopy.length - 1]).getExpression();
|
||||
if (!(expr instanceof PsiAssignmentExpression)) {
|
||||
|
||||
Reference in New Issue
Block a user