settings-sync: set value before decrementing the CountDownLatch which waits for this value to be set

Otherwise, countDown() can release the latch, when the pushSnapshot is not set yet which results in UninitializedPropertyAccessException.

GitOrigin-RevId: 14153a622d1a2ef4913ea10471bc939f3aaf02fd
This commit is contained in:
Kirill Likhodedov
2023-01-23 17:46:11 +01:00
committed by intellij-monorepo-bot
parent 233702c5e5
commit 36f7fe2da5

View File

@@ -21,8 +21,8 @@ internal abstract class TestRemoteCommunicator : SettingsSyncRemoteCommunicator
protected fun settingsPushed(snapshot: SettingsSnapshot) {
if (::pushedLatch.isInitialized) {
pushedLatch.countDown()
pushedSnapshot = snapshot
pushedLatch.countDown()
}
}