Skip to content

Commit 65bd9f4

Browse files
authored
Singled out duplicated condition
1 parent 000212c commit 65bd9f4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

NaturalOrderComparator.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ int compareRight(String a, String b)
5252
return bias;
5353
}
5454

55-
if (ca < cb) {
56-
if (bias == 0) {
55+
if (bias == 0) {
56+
if (ca < cb) {
5757
bias = -1;
58+
} else if (ca > cb) {
59+
bias = +1;
5860
}
59-
} else if (ca > cb && bias == 0) {
60-
bias = +1;
6161
}
6262
}
6363
}

0 commit comments

Comments
 (0)