INT-4484: Fix SyndEntryPublishedDateComparator

JIRA: https://jira.spring.io/browse/INT-4484

Fix the `SyndEntryPublishedDateComparator` to move entries without a
date into the end of the sorted list

**Cherry-pick to 5.0.x and 4.3.x**
This commit is contained in:
Artem Bilan
2018-06-12 14:05:40 -04:00
committed by Gary Russell
parent a954290561
commit 2267f72e5b

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -279,7 +279,7 @@ public class FeedEntryMessageSource extends IntegrationObjectSupport implements
if (date1 == null && date2 == null) {
return 0;
}
return (date2 == null) ? 1 : 0;
return date2 == null ? -1 : 1;
}
}