-
Enhancement
-
Resolution: Done
-
Major
-
4.3.1.CR1
-
None
CreationTimestampComparator makes a resource with missing/invalid date equal to any other resource. If in a list of resources one is invalid, it will make result unpredictable. It is better to move an invalid timestamp to the end of the list by assuming that it is less than any valid timestamp, it will ensure correct sorting of resources with valid timestamps.
Also this comparator may be reused in OpenShiftResourcePropertySection.createCreatedBySorter() - the logic is the same.
DateTimeUtils.parse(String) is better to prevent NPE or ArrayIndexOutOfBoundsException and throw the declared ParseException for empty value instead.