Skip to content

Commit

Permalink
Always keep Projects in cache
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet committed May 15, 2024
1 parent d203d19 commit 6112625
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import java.nio.file.Path;
import java.time.Instant;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;

import org.apache.maven.RepositoryUtils;
import org.apache.maven.api.*;
Expand Down Expand Up @@ -49,7 +50,7 @@ public class DefaultSession extends AbstractSession implements InternalMavenSess
private final MavenSession mavenSession;
private final MavenRepositorySystem mavenRepositorySystem;
private final RuntimeInformation runtimeInformation;
private final Map<String, Project> allProjects = Collections.synchronizedMap(new WeakHashMap<>());
private final Map<String, Project> allProjects = new ConcurrentHashMap<>();

@SuppressWarnings("checkstyle:ParameterNumber")
public DefaultSession(
Expand Down

0 comments on commit 6112625

Please sign in to comment.