From e1cd7236ff7204d013dffbfdca13dc515298db1e Mon Sep 17 00:00:00 2001 From: Sergey Karashevich Date: Mon, 17 Sep 2018 17:31:11 +0300 Subject: [PATCH] [gui-test] proper reading text of SimpleColoredComponent We should use SimpleColoredComponent#getCharSequence method to get the SCC text value instead of iterator because it is not thread safe. --- .../testGuiFramework/cellReader/ExtendedCellReaders.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/testGuiFramework/src/com/intellij/testGuiFramework/cellReader/ExtendedCellReaders.kt b/platform/testGuiFramework/src/com/intellij/testGuiFramework/cellReader/ExtendedCellReaders.kt index 2006483b3db7..a670bdc7a24d 100644 --- a/platform/testGuiFramework/src/com/intellij/testGuiFramework/cellReader/ExtendedCellReaders.kt +++ b/platform/testGuiFramework/src/com/intellij/testGuiFramework/cellReader/ExtendedCellReaders.kt @@ -119,14 +119,14 @@ private fun getValueWithCellRenderer(cellRendererComponent: Component, isExtende private fun SimpleColoredComponent.getFullText(): String? { return computeOnEdt { - this.iterator().asSequence().joinToString() + this.getCharSequence(false).toString() } } private fun SimpleColoredComponent.getFirstText(): String? { return computeOnEdt { - this.iterator().asSequence().joinToString() + this.getCharSequence(true).toString() } }