From a8e133f10b8767b72127baecf5cc17c377aefe02 Mon Sep 17 00:00:00 2001 From: Sergey Malenkov Date: Thu, 1 Nov 2018 13:05:23 +0300 Subject: [PATCH] EA-110062: improve error logging to understand the reason --- .../lang/properties/structureView/GroupByWordPrefixes.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/structureView/GroupByWordPrefixes.java b/plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/structureView/GroupByWordPrefixes.java index a92f4f646dde..850fe8278488 100644 --- a/plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/structureView/GroupByWordPrefixes.java +++ b/plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/structureView/GroupByWordPrefixes.java @@ -75,7 +75,8 @@ public class GroupByWordPrefixes implements Grouper, Sorter { } final String text = ((IProperty) value).getUnescapedKey(); if (text == null) continue; - LOG.assertTrue(text.startsWith(parentPrefix) || text.startsWith(mySeparator)); + boolean expected = text.startsWith(parentPrefix) || text.startsWith(mySeparator); + if (!expected) LOG.error("unexpected text: " + text + "; parentPrefix=" + parentPrefix + "; mySeparator=" + mySeparator); List words = StringUtil.split(text, mySeparator); keys.add(new Key(words, element)); }