diff --git a/platform/platform-tests/testSrc/com/intellij/psi/util/NameUtilTest.java b/platform/platform-tests/testSrc/com/intellij/psi/util/NameUtilTest.java index 55f5cce4a9b0..ff141d3423c8 100644 --- a/platform/platform-tests/testSrc/com/intellij/psi/util/NameUtilTest.java +++ b/platform/platform-tests/testSrc/com/intellij/psi/util/NameUtilTest.java @@ -256,6 +256,7 @@ public class NameUtilTest extends UsefulTestCase { assertFalse(firstLetterMatcher(" a").matches("Aaa")); assertFalse(firstLetterMatcher(" _bl").matches("_top")); assertFalse(firstLetterMatcher("*Ch").matches("char")); + assertTrue(firstLetterMatcher("*codes").matches("CFLocaleCopyISOCountryCodes")); } private static Matcher firstLetterMatcher(String pattern) { diff --git a/platform/util/src/com/intellij/psi/codeStyle/MinusculeMatcher.java b/platform/util/src/com/intellij/psi/codeStyle/MinusculeMatcher.java index a6772608778a..1b0c2944c407 100644 --- a/platform/util/src/com/intellij/psi/codeStyle/MinusculeMatcher.java +++ b/platform/util/src/com/intellij/psi/codeStyle/MinusculeMatcher.java @@ -196,7 +196,8 @@ public class MinusculeMatcher implements Matcher { break; } if (next == 0 && myOptions != NameUtil.MatchingCaseSensitivity.NONE && name.charAt(next) != nextChar) { - return null; + fromIndex = next + 1; + continue; } if (upper && next > 0 && !Character.isUpperCase(name.charAt(next))) { fromIndex = next + 1;