Skip to content

Commit

Permalink
Fix issue with multi-editing provs that have non-date objects
Browse files Browse the repository at this point in the history
  • Loading branch information
mmyers committed Sep 18, 2023
1 parent b32a86d commit a71111e
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,19 @@ private static Integer getInt(final String s) {

@Override
public final int compare(final String s1, final String s2) {
if (!Character.isDigit(s1.charAt(0))) {
if (!Character.isDigit((s2.charAt(0)))) {
// neither numeric, sort lexically
return s1.compareTo(s2);
} else {
// s2 numeric, sort s1 first
return -1;
}
} else if (!Character.isDigit((s2.charAt(0)))) {
// s1 numeric but s2 is not, sort s2 first
return 1;
}

final String[] s1Split = split(s1);
final String[] s2Split = split(s2);

Expand Down

0 comments on commit a71111e

Please sign in to comment.