From b171b45634bbd1ee8eac6907e4f49af88c2f58ad Mon Sep 17 00:00:00 2001 From: peter Date: Fri, 8 Jun 2018 11:33:22 +0200 Subject: [PATCH] PropertyFoldingBuilder: avoid SOE --- .../codeInspection/i18n/folding/PropertyFoldingBuilder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/java-i18n/src/com/intellij/codeInspection/i18n/folding/PropertyFoldingBuilder.java b/plugins/java-i18n/src/com/intellij/codeInspection/i18n/folding/PropertyFoldingBuilder.java index fbe1cc75a6f9..41caafa20cc9 100644 --- a/plugins/java-i18n/src/com/intellij/codeInspection/i18n/folding/PropertyFoldingBuilder.java +++ b/plugins/java-i18n/src/com/intellij/codeInspection/i18n/folding/PropertyFoldingBuilder.java @@ -62,7 +62,7 @@ public class PropertyFoldingBuilder extends FoldingBuilderEx { final List result = new ArrayList<>(); boolean hasJsp = ContainerUtil.intersects(Arrays.asList(StdLanguages.JSP, StdLanguages.JSPX), file.getViewProvider().getLanguages()); //hack here because JspFile PSI elements are not threaded correctly via nextSibling/prevSibling - file.accept(hasJsp ? new JavaRecursiveElementVisitor() { + file.accept(hasJsp ? new JavaRecursiveElementWalkingVisitor() { @Override public void visitLiteralExpression(PsiLiteralExpression expression) { ULiteralExpression uLiteralExpression = UastContextKt.toUElement(expression, ULiteralExpression.class); @@ -70,7 +70,7 @@ public class PropertyFoldingBuilder extends FoldingBuilderEx { checkLiteral(uLiteralExpression, result); } } - } : new PsiRecursiveElementVisitor() { + } : new PsiRecursiveElementWalkingVisitor() { @Override public void visitElement(PsiElement element) {