Skip to content
Prev Previous commit
Next Next commit
fix: remove unused variable
  • Loading branch information
daniel-mohedano committed Mar 30, 2026
commit 036798858544965c2dfd3f613afea3d337b476ba
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ private static final class RepoIndexingFileVisitor implements FileVisitor<Path>
private final PackageResolver packageResolver;
private final ResourceResolver resourceResolver;
private final ClassNameTrie.Builder trieBuilder;
private final Map<String, String> trieKeyToPath;
private final Map<String, Integer> trieKeyToSourceRootIdx;
private final Map<String, List<Integer>> duplicateSourceRootIndices;
private final Map<RepoIndex.SourceRoot, Integer> sourceRoots;
Expand All @@ -116,7 +115,6 @@ private RepoIndexingFileVisitor(
this.resourceResolver = resourceResolver;
this.repoRoot = repoRoot;
trieBuilder = new ClassNameTrie.Builder();
trieKeyToPath = new HashMap<>();
trieKeyToSourceRootIdx = new HashMap<>();
duplicateSourceRootIndices = new HashMap<>();
sourceRoots = new HashMap<>();
Expand Down Expand Up @@ -179,10 +177,9 @@ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) {
String key = Utils.toTrieKey(relativePath);
trieBuilder.put(key, sourceRootIdx);

String existingPath = trieKeyToPath.put(key, file.toString());
Integer existingSourceRootIdx = trieKeyToSourceRootIdx.put(key, sourceRootIdx);
if (existingPath != null) {
log.debug("Duplicate repo index key: {} - {}", existingPath, file);
if (existingSourceRootIdx != null) {
log.debug("Duplicate repo index key: {}", key);
duplicateSourceRootIndices
.computeIfAbsent(
key,
Expand Down