From a71111ec505fee06127f5494b643655ee8ce9610 Mon Sep 17 00:00:00 2001 From: mmyers Date: Mon, 18 Sep 2023 11:32:55 -0500 Subject: [PATCH] Fix issue with multi-editing provs that have non-date objects --- .../eug/specific/clausewitz/ClausewitzHistory.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/EugFile_specific/src/eug/specific/clausewitz/ClausewitzHistory.java b/EugFile_specific/src/eug/specific/clausewitz/ClausewitzHistory.java index d39a3de..ca4ebdd 100644 --- a/EugFile_specific/src/eug/specific/clausewitz/ClausewitzHistory.java +++ b/EugFile_specific/src/eug/specific/clausewitz/ClausewitzHistory.java @@ -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);