mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
simplify to use one guard to prevent caching
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user