[^yole] anonymous classes producing INRE during superclass resolve don't deserve to be considered closures (EA-35159)

This commit is contained in:
peter
2012-04-03 16:29:32 +02:00
parent 86ff1559ad
commit b44139b98f
@@ -26,6 +26,7 @@ import com.intellij.openapi.editor.Document;
import com.intellij.openapi.editor.FoldingGroup;
import com.intellij.openapi.progress.ProgressManager;
import com.intellij.openapi.project.DumbAware;
import com.intellij.openapi.project.IndexNotReadyException;
import com.intellij.openapi.util.TextRange;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.psi.*;
@@ -715,7 +716,12 @@ public class JavaFoldingBuilder extends CustomFoldingBuilder implements DumbAwar
}
}
return !OverrideImplementUtil.getMethodSignaturesToImplement(baseClass).isEmpty();
try {
return !OverrideImplementUtil.getMethodSignaturesToImplement(baseClass).isEmpty();
}
catch (IndexNotReadyException e) {
return false;
}
}
private static boolean addToFold(List<FoldingDescriptor> list, PsiElement elementToFold, Document document, boolean allowOneLiners) {