From 2267f72e5b28cb7dbd3fe16457d19474835236bd Mon Sep 17 00:00:00 2001 From: Artem Bilan Date: Tue, 12 Jun 2018 14:05:40 -0400 Subject: [PATCH] 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** --- .../integration/feed/inbound/FeedEntryMessageSource.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-integration-feed/src/main/java/org/springframework/integration/feed/inbound/FeedEntryMessageSource.java b/spring-integration-feed/src/main/java/org/springframework/integration/feed/inbound/FeedEntryMessageSource.java index 6cf33994a6..5e8966dc95 100644 --- a/spring-integration-feed/src/main/java/org/springframework/integration/feed/inbound/FeedEntryMessageSource.java +++ b/spring-integration-feed/src/main/java/org/springframework/integration/feed/inbound/FeedEntryMessageSource.java @@ -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; } }