Skip to content

Commit 3bb6c33

Browse files
committed
refactor(model-server): remove some warnings in LightModelServer
Removes some unneeded not-null assertions and reduces the visibility of a function.
1 parent 0b3fc19 commit 3bb6c33

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

model-server/src/main/kotlin/org/modelix/model/server/handlers/LightModelServer.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ import kotlin.collections.set
6565

6666
class LightModelServer(val client: LocalModelClient) {
6767

68-
fun getStore() = client.storeCache!!
68+
private fun getStore() = client.storeCache
6969

7070
fun init(application: Application) {
7171
application.apply {
@@ -80,7 +80,7 @@ class LightModelServer(val client: LocalModelClient) {
8080
}
8181

8282
private fun getCurrentVersion(repositoryId: RepositoryId): CLVersion {
83-
val versionHash = client.asyncStore?.get(repositoryId.getBranchKey())!!
83+
val versionHash = client.asyncStore.get(repositoryId.getBranchKey())!!
8484
return CLVersion.loadFromHash(versionHash, getStore())
8585
}
8686

0 commit comments

Comments
 (0)