mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[Workspace Model] orderEntries should be calculated on every access because libraryTable class is not immutable
GitOrigin-RevId: 73afd4bbe79512530e8885f1246c92562e95a319
This commit is contained in:
committed by
intellij-monorepo-bot
parent
f1df512064
commit
c427b26380
+9
-6
@@ -38,12 +38,15 @@ internal class RootModelViaTypedEntityImpl(internal val moduleEntityId: Persiste
|
||||
|
||||
val moduleEntity: ModuleEntity? = storage.resolve(moduleEntityId)
|
||||
|
||||
private val orderEntriesArray by lazy {
|
||||
val moduleEntity = storage.resolve(moduleEntityId) ?: return@lazy emptyArray<OrderEntry>()
|
||||
moduleEntity.dependencies.mapIndexed { index, e ->
|
||||
toOrderEntry(e, index)
|
||||
}.toTypedArray()
|
||||
}
|
||||
private val orderEntriesArray: Array<OrderEntry>
|
||||
get() {
|
||||
// This variable should not be cached unless
|
||||
// com.intellij.workspace.legacyBridge.intellij.LegacyBridgeModuleRootComponent.moduleLibraries is mutable
|
||||
val moduleEntity = storage.resolve(moduleEntityId) ?: return emptyArray()
|
||||
return moduleEntity.dependencies.mapIndexed { index, e ->
|
||||
toOrderEntry(e, index)
|
||||
}.toTypedArray()
|
||||
}
|
||||
|
||||
val contentEntities: List<ContentRootEntity> by lazy {
|
||||
val moduleEntity = storage.resolve(moduleEntityId) ?: return@lazy emptyList<ContentRootEntity>()
|
||||
|
||||
Reference in New Issue
Block a user