Skip to content
This repository has been archived by the owner on Feb 25, 2023. It is now read-only.

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
itsaky committed Aug 5, 2022
1 parent 379a103 commit 8ff06f9
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public int compare(Path f1, Path f2) {
* for a single Location, we should know all valid RelativeDirectory mappings. Because the
* indexing is costly for very large classpaths, this can result in a significant savings.
*/
private Map<Location, Map<RelativeDirectory, java.util.List<PathAndContainer>>>
public Map<Location, Map<RelativeDirectory, java.util.List<PathAndContainer>>>
pathsAndContainersByLocationAndRelativeDirectory = new HashMap<>();

/** Containers that have no indexing by {@link RelativeDirectory}, keyed by {@link Location}. */
Expand All @@ -161,6 +161,10 @@ public JavacFileManager(Context context, boolean register, Charset charset) {
setContext(context);
}

public void cacheLocation(Location location) {
this.pathsAndContainersByLocationAndRelativeDirectory.computeIfAbsent(location, this::indexPathsAndContainersByRelativeDirectory);
}

/**
* Set the context for JavacFileManager.
*/
Expand Down

0 comments on commit 8ff06f9

Please sign in to comment.