Skip to content

Commit

Permalink
EA-222240 - SIOOBE: Pluralizer.restoreCase
Browse files Browse the repository at this point in the history
(cherry picked from commit 4f00a780ada886568c585dd9ca503d70ab6cb1aa)

GitOrigin-RevId: 7a904f8833fed7d811fe4aee0597874d09899603
  • Loading branch information
gregsh authored and intellij-monorepo-bot committed Feb 12, 2020
1 parent 6f819f9 commit bf4755b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit bf4755b

Please sign in to comment.