From 69e0ecef4c1cae6b0e63307d4859c408218b15c0 Mon Sep 17 00:00:00 2001 From: Evgenii Novozhilov Date: Tue, 11 Feb 2025 13:57:15 +0200 Subject: [PATCH] testFramework: fix wrong type in RegistryValue.withValue it was inspired by the other overload and there was no check that the value set after is identical to the original one (cherry picked from commit fbeb49678b2af7c3356df740b5d7f98bef380550) GitOrigin-RevId: c7252a000301e90c4ad4f0df08612ce1b6a0fa2a --- .../src/com/intellij/openapi/util/registry/RegistryTestUtil.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/testFramework/src/com/intellij/openapi/util/registry/RegistryTestUtil.kt b/platform/testFramework/src/com/intellij/openapi/util/registry/RegistryTestUtil.kt index f6d490a8ef05..ed2ed23c9244 100644 --- a/platform/testFramework/src/com/intellij/openapi/util/registry/RegistryTestUtil.kt +++ b/platform/testFramework/src/com/intellij/openapi/util/registry/RegistryTestUtil.kt @@ -14,7 +14,7 @@ inline fun RegistryValue.withValue(tempValue: Boolean, crossinline block: () -> } inline fun RegistryValue.withValue(tempValue: String, crossinline block: () -> Unit) { - val currentValue = asBoolean() + val currentValue = asString() try { setValue(tempValue) block()