AA: remove redundant code
computeIfAbsent right below will do the same thing
This commit is contained in:
-3
@@ -381,9 +381,6 @@ public class KotlinFakeClsStubsCache {
|
|||||||
storage: (VirtualFile) -> Map<VirtualFile, KotlinFileStubImpl>
|
storage: (VirtualFile) -> Map<VirtualFile, KotlinFileStubImpl>
|
||||||
): Map<VirtualFile, KotlinFileStubImpl>? {
|
): Map<VirtualFile, KotlinFileStubImpl>? {
|
||||||
val service = ApplicationManager.getApplication().getService(KotlinFakeClsStubsCache::class.java) ?: return null
|
val service = ApplicationManager.getApplication().getService(KotlinFakeClsStubsCache::class.java) ?: return null
|
||||||
if (service.fakeFileClsStubs[root.path] == null) {
|
|
||||||
service.fakeFileClsStubs[root.path] = storage(root)
|
|
||||||
}
|
|
||||||
return service.fakeFileClsStubs.computeIfAbsent(root.path) { _ ->
|
return service.fakeFileClsStubs.computeIfAbsent(root.path) { _ ->
|
||||||
storage(root)
|
storage(root)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user