From 5f401a62cbb8ed246ff8a71ef5b9df631722c153 Mon Sep 17 00:00:00 2001 From: Dmitry Batkovich Date: Tue, 26 Apr 2016 19:59:51 +0300 Subject: [PATCH] inspection tool window: do not need sort list with size == 1 --- .../src/com/intellij/codeInspection/ui/InspectionTree.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionTree.java b/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionTree.java index dc1c645b7168..982f73785e76 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionTree.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionTree.java @@ -337,7 +337,9 @@ public class InspectionTree extends Tree { } if (descriptorChildren != null) { - Collections.sort(descriptorChildren, DESCRIPTOR_COMPARATOR); + if (descriptorChildren.size() > 1) { + Collections.sort(descriptorChildren, DESCRIPTOR_COMPARATOR); + } descriptors.addAll(descriptorChildren); } }