From e23c438ad0c5eaacd201602c4e6a5e951b0f9b0a Mon Sep 17 00:00:00 2001 From: Nikolay Chashnikov Date: Tue, 6 Apr 2021 17:01:07 +0300 Subject: [PATCH] [workspace model utils] load resStore in StoreSnapshotsAnalyzer before other files ...because they may be absent if both 'left' and 'right' arguments of AbstractEntityStorage.reportConsistencyIssue are null. GitOrigin-RevId: f4a45c94f320c185f1ffce35fc3cda16ff03c4df --- .../com/intellij/workspaceModel/ide/StoreSnapshotsAnalyzer.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/workspaceModel/ide/tests/testSrc/com/intellij/workspaceModel/ide/StoreSnapshotsAnalyzer.kt b/platform/workspaceModel/ide/tests/testSrc/com/intellij/workspaceModel/ide/StoreSnapshotsAnalyzer.kt index be37dae07d37..631a9d244264 100644 --- a/platform/workspaceModel/ide/tests/testSrc/com/intellij/workspaceModel/ide/StoreSnapshotsAnalyzer.kt +++ b/platform/workspaceModel/ide/tests/testSrc/com/intellij/workspaceModel/ide/StoreSnapshotsAnalyzer.kt @@ -45,11 +45,12 @@ fun main(args: Array) { serializer.deserializeClassToIntConverter(converterFile.inputStream()) + val resStore = serializer.deserializeCache(resFile.inputStream())!! + val leftStore = serializer.deserializeCache(leftFile.inputStream()) ?: throw IllegalArgumentException("Cannot load cache") val filterPattern = args.getOrNull(1) if (filterPattern != null) { val rightStore = serializer.deserializeCache(rightFile.inputStream())!! - val resStore = serializer.deserializeCache(resFile.inputStream())!! val allEntitySources = leftStore.entitiesBySource { true }.map { it.key }.toHashSet() allEntitySources.addAll(rightStore.entitiesBySource { true }.map { it.key }) @@ -63,7 +64,6 @@ fun main(args: Array) { } else { val rightStore = serializer.deserializeCacheAndDiffLog(rightFile.inputStream(), rightDiffLogFile.inputStream())!! - val resStore = serializer.deserializeCache(resFile.inputStream())!! val expectedResult = leftStore.toBuilder() expectedResult.addDiff(rightStore)