Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
anto-deepsource committed Apr 12, 2024
1 parent edc9669 commit e302c34
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/main/java/spoon/reflect/factory/TypeFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,10 @@ public class TypeFactory extends SubFactory {
@Deprecated(since = "11.0.0", forRemoval = true)
public final CtTypeReference<?> OMITTED_TYPE_ARG_TYPE = createReference(CtTypeReference.OMITTED_TYPE_ARG_NAME);

private final Map<Class<?>, CtType<?>> shadowCache = new ConcurrentHashMap<>();
private final ConcurrentHashMap<String, WeakReference<CtType<?>>> typeRefCache = new ConcurrentHashMap<>();

// This map MUST provide a useful computeIfAbsent method in the face of concurrency.
// Therefore, we declare it as a ConcurrentHashMap directly.
private final ConcurrentHashMap<Class<?>, CtType<?>> shadowCache = new ConcurrentHashMap<>();
private final ConcurrentHashMap<String, WeakReference<CtType<?>>> typeRefCache = new ConcurrentHashMap<>();

/**
* Returns a reference on the null type (type of null).
Expand Down

0 comments on commit e302c34

Please sign in to comment.