Skip to content

Commit 058ae6f

Browse files
artembilangaryrussell
authored andcommitted
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**
1 parent 3c5edba commit 058ae6f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spring-integration-feed/src/main/java/org/springframework/integration/feed/inbound/FeedEntryMessageSource.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2016 the original author or authors.
2+
* Copyright 2002-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -279,7 +279,7 @@ public int compare(SyndEntry entry1, SyndEntry entry2) {
279279
if (date1 == null && date2 == null) {
280280
return 0;
281281
}
282-
return (date2 == null) ? 1 : 0;
282+
return date2 == null ? -1 : 1;
283283
}
284284

285285
}

0 commit comments

Comments
 (0)