Skip to content

Commit 40ae4d1

Browse files
committed
Fix storage of source jar paths in the database
1 parent ca09671 commit 40ae4d1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ internal class CachedClassPathResolver(
6060
ClassPathCacheEntryEntity.all().map {
6161
ClassPathEntry(
6262
compiledJar = Paths.get(it.compiledJar),
63-
sourceJar = if (it.sourceJar != null) Paths.get(it.sourceJar) else null
63+
sourceJar = it.sourceJar?.let(Paths::get)
6464
)
6565
}.toSet()
6666
}
@@ -69,7 +69,7 @@ internal class CachedClassPathResolver(
6969
newEntries.map {
7070
ClassPathCacheEntryEntity.new {
7171
compiledJar = it.compiledJar.toString()
72-
sourceJar = it.sourceJar.toString()
72+
sourceJar = it.sourceJar?.toString()
7373
}
7474
}
7575
}

0 commit comments

Comments
 (0)