Skip to content

Commit 4c588a7

Browse files
daplffwcd
andauthored
Update shared/src/main/kotlin/org/javacs/kt/classpath/DefaultClassPathResolver.kt
Co-authored-by: FW <30873659+fwcd@users.noreply.github.com>
1 parent 22c0112 commit 4c588a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

shared/src/main/kotlin/org/javacs/kt/classpath/DefaultClassPathResolver.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ fun defaultClassPathResolver(workspaceRoots: Collection<Path>, db: Database? = n
1212
.or(workspaceRoots.asSequence().flatMap { workspaceResolvers(it) }.joined)
1313
).or(BackupClassPathResolver)
1414

15-
return if (db != null) CachedClassPathResolver(childResolver, db) else childResolver
15+
return db?.let { CachedClassPathResolver(childResolver, it) } ?: childResolver
1616
}
1717

1818
/** Searches the workspace for all files that could provide classpath info. */

0 commit comments

Comments
 (0)