camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject git commit: CAMEL-7659 fixed the issue that camel-atom filter always returns the last consumed entry from feed more than once
Date Wed, 13 Aug 2014 14:07:17 GMT
Repository: camel
Updated Branches:
  refs/heads/master ac8c494f9 -> 25740b0e4


CAMEL-7659 fixed the issue that camel-atom filter always returns the last consumed entry from
feed more than once


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/25740b0e
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/25740b0e
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/25740b0e

Branch: refs/heads/master
Commit: 25740b0e4a50aa6446b962871d64ef475326ac84
Parents: ac8c494
Author: Willem Jiang <willem.jiang@gmail.com>
Authored: Wed Aug 13 18:02:16 2014 +0800
Committer: Willem Jiang <willem.jiang@gmail.com>
Committed: Wed Aug 13 22:06:09 2014 +0800

----------------------------------------------------------------------
 .../java/org/apache/camel/component/atom/UpdatedDateFilter.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/25740b0e/components/camel-atom/src/main/java/org/apache/camel/component/atom/UpdatedDateFilter.java
----------------------------------------------------------------------
diff --git a/components/camel-atom/src/main/java/org/apache/camel/component/atom/UpdatedDateFilter.java
b/components/camel-atom/src/main/java/org/apache/camel/component/atom/UpdatedDateFilter.java
index 8a78a1d..f5067a5 100644
--- a/components/camel-atom/src/main/java/org/apache/camel/component/atom/UpdatedDateFilter.java
+++ b/components/camel-atom/src/main/java/org/apache/camel/component/atom/UpdatedDateFilter.java
@@ -50,7 +50,8 @@ public class UpdatedDateFilter implements EntryFilter {
             return true;
         }        
         if (lastUpdate != null) {
-            if (lastUpdate.after(updated)) {
+            // we need to skip the latest updated entry
+            if (lastUpdate.after(updated) || lastUpdate.equals(updated)) {
                 LOG.debug("Entry is older than lastupdate=[{}], no valid entry=[{}]", lastUpdate,
entry);
                 return false;
             }


Mime
View raw message