diff --git a/python/psi-api/src/com/jetbrains/python/psi/types/TypeEvalContext.java b/python/psi-api/src/com/jetbrains/python/psi/types/TypeEvalContext.java index fba9dfdb38d8..2cfa83700986 100644 --- a/python/psi-api/src/com/jetbrains/python/psi/types/TypeEvalContext.java +++ b/python/psi-api/src/com/jetbrains/python/psi/types/TypeEvalContext.java @@ -47,18 +47,8 @@ public class TypeEvalContext { private final Map myEvaluated = new HashMap<>(); private final Map myEvaluatedReturn = new HashMap<>(); - private final ThreadLocal> myEvaluating = new ThreadLocal>() { - @Override - protected Set initialValue() { - return new HashSet<>(); - } - }; - private final ThreadLocal> myEvaluatingReturn = new ThreadLocal>() { - @Override - protected Set initialValue() { - return new HashSet<>(); - } - }; + private final ThreadLocal> myEvaluating = ThreadLocal.withInitial(HashSet::new); + private final ThreadLocal> myEvaluatingReturn = ThreadLocal.withInitial(HashSet::new); private TypeEvalContext(boolean allowDataFlow, boolean allowStubToAST, boolean allowCallContext, @Nullable PsiFile origin) { myConstraints = new TypeEvalConstraints(allowDataFlow, allowStubToAST, allowCallContext, origin); @@ -254,7 +244,7 @@ public class TypeEvalContext { } /** - * @return context constraints (see {@link com.jetbrains.python.psi.types.TypeEvalConstraints} + * @return context constraints (see {@link TypeEvalConstraints} */ @NotNull TypeEvalConstraints getConstraints() {