File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
server/src/main/kotlin/org/javacs/kt/config Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -14,12 +14,12 @@ fun parseServerConfiguration(params: InitializeParams): ServerConfiguration? {
14
14
15
15
var storage: Storage ? = null
16
16
17
- if ( params.initializationOptions != null ) {
18
- val options = gson.fromJson(params. initializationOptions as JsonElement , InitializationOptions ::class .java)
17
+ params.initializationOptions?. let { initializationOptions ->
18
+ val options = gson.fromJson(initializationOptions as JsonElement , InitializationOptions ::class .java)
19
19
20
- if ( options.storagePath != null ) {
21
- if (Files .exists(options.storagePath) && Files . isDirectory(options. storagePath)) {
22
- storage = Storage (options. storagePath)
20
+ options.storagePath?. let { storagePath ->
21
+ if (Files .isDirectory(storagePath)) {
22
+ storage = Storage (storagePath)
23
23
}
24
24
}
25
25
}
You can’t perform that action at this time.
0 commit comments