simplify to use one guard to prevent caching

This commit is contained in:
Anna Kozlova
2015-10-02 20:32:05 +02:00
parent d3d8d033f0
commit 565835bd5f
@@ -84,9 +84,8 @@ public class JavaResolveCache {
PsiType type = isOverloadCheck ? null : myCalculatedTypes.get(expr);
if (type == null) {
final RecursionGuard.StackStamp dStackStamp = PsiDiamondType.ourDiamondGuard.markStack();
final RecursionGuard.StackStamp gStackStamp = PsiResolveHelper.ourGraphGuard.markStack();
type = f.fun(expr);
if (!dStackStamp.mayCacheNow() || !gStackStamp.mayCacheNow() || isOverloadCheck) {
if (!dStackStamp.mayCacheNow() || isOverloadCheck) {
return type;
}
if (type == null) type = TypeConversionUtil.NULL_TYPE;