From 7bbd6f20d2c758bc4c9059b52ce9b02f7c628a92 Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Wed, 17 Feb 2016 13:05:23 +0100 Subject: [PATCH] add type to assertion message --- platform/configuration-store-impl/src/StateMap.kt | 2 +- platform/configuration-store-impl/src/StorageBaseEx.kt | 2 +- platform/configuration-store-impl/src/XmlElementStorage.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/platform/configuration-store-impl/src/StateMap.kt b/platform/configuration-store-impl/src/StateMap.kt index 54e94df82ebb..2941b890e314 100644 --- a/platform/configuration-store-impl/src/StateMap.kt +++ b/platform/configuration-store-impl/src/StateMap.kt @@ -203,7 +203,7 @@ class StateMap private constructor(private val names: Array, private val } val currentState = states.get(index) - LOG.assertTrue(currentState is Element) + LOG.assertTrue(currentState is Element, currentState?.let { it.javaClass.name } ?: "null") states.set(index, if (state == null) null else archiveState(state).toByteArray()) } } diff --git a/platform/configuration-store-impl/src/StorageBaseEx.kt b/platform/configuration-store-impl/src/StorageBaseEx.kt index 72ed7d7cd8a8..bdc7ce320f03 100644 --- a/platform/configuration-store-impl/src/StorageBaseEx.kt +++ b/platform/configuration-store-impl/src/StorageBaseEx.kt @@ -56,7 +56,7 @@ class StateGetter(private val component: PersistentStateCompon try { stateAfterLoad = component.state } - catch(e: Throwable) { + catch (e: Throwable) { LOG.error("Cannot get state after load", e) stateAfterLoad = null } diff --git a/platform/configuration-store-impl/src/XmlElementStorage.kt b/platform/configuration-store-impl/src/XmlElementStorage.kt index ceedbe8741e8..f0b2854718e6 100644 --- a/platform/configuration-store-impl/src/XmlElementStorage.kt +++ b/platform/configuration-store-impl/src/XmlElementStorage.kt @@ -226,7 +226,7 @@ fun save(states: StateMap, rootElementName: String, newLiveStates: Map