WEB-9926 don't auto expand library scope, we must use case-sensitive natural compare — constants must be first

This commit is contained in:
Vladimir Krivosheev
2014-02-24 18:19:22 +01:00
parent 4be43bab7d
commit 5ef006cce7
2 changed files with 3 additions and 3 deletions
@@ -2286,7 +2286,7 @@ public class StringUtil extends StringUtilRt {
return naturalCompare(string1, string2, false);
}
private static int naturalCompare(@Nullable String string1, @Nullable String string2, boolean caseSensitive) {
public static int naturalCompare(@Nullable String string1, @Nullable String string2, boolean caseSensitive) {
//noinspection StringEquality
if (string1 == string2) {
return 0;
@@ -2635,7 +2635,7 @@ public class StringUtil extends StringUtilRt {
* i.e. when java.util.regex.Pattern match goes out of control.
*/
public abstract static class BombedCharSequence implements CharSequence {
private CharSequence delegate;
private final CharSequence delegate;
private int i = 0;
public BombedCharSequence(@NotNull CharSequence sequence) {
@@ -44,7 +44,7 @@ public class XValueNodeImpl extends XValueContainerNode<XValue> implements XValu
@Override
public int compare(XValueNodeImpl o1, XValueNodeImpl o2) {
//noinspection ConstantConditions
return StringUtil.naturalCompare(o1.getName(), o2.getName());
return StringUtil.naturalCompare(o1.getName(), o2.getName(), true);
}
};