mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
Better fix for IDEA-262732 (IJ-CR-9538)
GitOrigin-RevId: eb4cd1e697de47d81e1a6ee0067301c8064dd795
This commit is contained in:
committed by
intellij-monorepo-bot
parent
5853add304
commit
c08ed28fa7
@@ -146,14 +146,21 @@ class StateMap private constructor(private val names: Array<String>, private val
|
||||
return null
|
||||
}
|
||||
|
||||
val prev = states.getAndUpdate(index) { state ->
|
||||
when {
|
||||
archive && state is Element -> archiveState(state).toByteArray()
|
||||
else -> state
|
||||
val prev = if (archive) {
|
||||
states.getAndUpdate(index) { state ->
|
||||
when (state) {
|
||||
is Element -> archiveState(state).toByteArray()
|
||||
else -> state
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!archive && prev is ByteArray) {
|
||||
return unarchiveState(prev)
|
||||
else {
|
||||
states.updateAndGet(index) { state ->
|
||||
when (state) {
|
||||
is ByteArray -> unarchiveState(state)
|
||||
else -> state
|
||||
}
|
||||
}
|
||||
}
|
||||
return prev as? Element
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user