File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed
server/src/main/kotlin/org/javacs/kt/externalsources
shared/src/main/kotlin/org/javacs/kt Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -35,10 +35,11 @@ class ClassContentProvider(
35
35
* If the file is inside a source archive, the source code is returned as is.
36
36
*/
37
37
fun contentOf (uri : KlsURI ): Pair <KlsURI , String > {
38
+ LOG .info(" Resolving {} for contents" , uri)
38
39
val resolvedUri = sourceArchiveProvider.fetchSourceArchive(uri.archivePath)?.let (uri.withSource(true )::withArchivePath) ? : uri
39
40
val key = resolvedUri.toString()
40
41
val (contents, extension) = cachedContents[key] ? : run {
41
- LOG .info(" Finding contents of {}" , describeURI(resolvedUri.fileUri))
42
+ LOG .info(" Reading contents of {}" , describeURI(resolvedUri.fileUri))
42
43
tryReadContentOf(resolvedUri)
43
44
? : tryReadContentOf(resolvedUri.withFileExtension(" class" ))
44
45
? : tryReadContentOf(resolvedUri.withFileExtension(" java" ))
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ internal class CachedClassPathResolver(
60
60
ClassPathCacheEntryEntity .all().map {
61
61
ClassPathEntry (
62
62
compiledJar = Paths .get(it.compiledJar),
63
- sourceJar = if ( it.sourceJar != null ) Paths .get(it.sourceJar) else null
63
+ sourceJar = it.sourceJar?. let ( Paths ::get)
64
64
)
65
65
}.toSet()
66
66
}
@@ -69,7 +69,7 @@ internal class CachedClassPathResolver(
69
69
newEntries.map {
70
70
ClassPathCacheEntryEntity .new {
71
71
compiledJar = it.compiledJar.toString()
72
- sourceJar = it.sourceJar.toString()
72
+ sourceJar = it.sourceJar? .toString()
73
73
}
74
74
}
75
75
}
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ class DatabaseMetadataEntity(id: EntityID<Int>) : IntEntity(id) {
26
26
class DatabaseService {
27
27
28
28
companion object {
29
- const val LATEST_VERSION = 1
29
+ const val LATEST_VERSION = 2
30
30
const val DB_FILENAME = " kls_database.db"
31
31
}
32
32
You can’t perform that action at this time.
0 commit comments