From bf4755b7abe0b22f1c9439ec7d0a8d64f232da8d Mon Sep 17 00:00:00 2001 From: "Gregory.Shrago" Date: Tue, 11 Feb 2020 23:02:19 +0300 Subject: [PATCH] EA-222240 - SIOOBE: Pluralizer.restoreCase (cherry picked from commit 4f00a780ada886568c585dd9ca503d70ab6cb1aa) GitOrigin-RevId: 7a904f8833fed7d811fe4aee0597874d09899603 --- .../util/src/com/intellij/openapi/util/text/Pluralizer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/util/src/com/intellij/openapi/util/text/Pluralizer.java b/platform/util/src/com/intellij/openapi/util/text/Pluralizer.java index e041551c975d2..c6226a46557d2 100644 --- a/platform/util/src/com/intellij/openapi/util/text/Pluralizer.java +++ b/platform/util/src/com/intellij/openapi/util/text/Pluralizer.java @@ -83,7 +83,7 @@ static String restoreCase(String word, String result) { if (wc != lc && wc != uc) break; chars[i] = wc; } - if (i < chars.length) { + if (i > 0 && i < chars.length) { char wc = word.charAt(i - 1); char uc = Character.toUpperCase(wc); char lc = Character.toLowerCase(wc);