From 047f9abaf76ecff910d19c3860702b5e59693018 Mon Sep 17 00:00:00 2001 From: Dmitriy Novozhilov Date: Mon, 24 Sep 2018 13:45:38 +0300 Subject: [PATCH] Make order of rendered diagnostics more stable There was a bug that sometimes diagnostics on the same element with same names but with different parameters had been reshuffled. --- .../src/org/jetbrains/kotlin/checkers/CheckerTestUtil.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/frontend/src/org/jetbrains/kotlin/checkers/CheckerTestUtil.java b/compiler/frontend/src/org/jetbrains/kotlin/checkers/CheckerTestUtil.java index 552c89cbaa1..b36c737fb1d 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/checkers/CheckerTestUtil.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/checkers/CheckerTestUtil.java @@ -17,6 +17,7 @@ package org.jetbrains.kotlin.checkers; import com.google.common.collect.LinkedListMultimap; +import com.google.common.collect.Maps; import com.intellij.openapi.util.TextRange; import com.intellij.openapi.util.text.StringUtil; import com.intellij.psi.PsiElement; @@ -708,7 +709,7 @@ public class CheckerTestUtil { } public Map getTextDiagnosticsMap() { - Map diagnosticMap = new HashMap<>(); + Map diagnosticMap = Maps.newLinkedHashMap(); for (AbstractTestDiagnostic diagnostic : diagnostics) { diagnosticMap.put(diagnostic, TextDiagnostic.asTextDiagnostic(diagnostic)); }