incubator-droids-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thors...@apache.org
Subject svn commit: r1433364 - /incubator/droids/branches/0.2.x-cleanup/droids-core/src/main/java/org/apache/droids/filter/AlreadyVisitedFilter.java
Date Tue, 15 Jan 2013 12:07:19 GMT
Author: thorsten
Date: Tue Jan 15 12:07:19 2013
New Revision: 1433364

URL: http://svn.apache.org/viewvc?rev=1433364&view=rev
Log:
Adding logger and adding query to the key

Modified:
    incubator/droids/branches/0.2.x-cleanup/droids-core/src/main/java/org/apache/droids/filter/AlreadyVisitedFilter.java

Modified: incubator/droids/branches/0.2.x-cleanup/droids-core/src/main/java/org/apache/droids/filter/AlreadyVisitedFilter.java
URL: http://svn.apache.org/viewvc/incubator/droids/branches/0.2.x-cleanup/droids-core/src/main/java/org/apache/droids/filter/AlreadyVisitedFilter.java?rev=1433364&r1=1433363&r2=1433364&view=diff
==============================================================================
--- incubator/droids/branches/0.2.x-cleanup/droids-core/src/main/java/org/apache/droids/filter/AlreadyVisitedFilter.java
(original)
+++ incubator/droids/branches/0.2.x-cleanup/droids-core/src/main/java/org/apache/droids/filter/AlreadyVisitedFilter.java
Tue Jan 15 12:07:19 2013
@@ -22,12 +22,17 @@ import java.util.HashSet;
 import java.util.Set;
 
 import org.apache.droids.core.Task;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * @version 1.0
  */
 public class AlreadyVisitedFilter<T extends Task> implements Filter<T> {
 
+    private static final Logger logger =
+            LoggerFactory.getLogger(AlreadyVisitedFilter.class);
+
     private Set<URI> visited;
 
     public AlreadyVisitedFilter() {
@@ -39,9 +44,10 @@ public class AlreadyVisitedFilter<T exte
     public T filter(final T task) {
         try {
             URI uri = task.getURI();
-            URI key = new URI(uri.getScheme(), null, uri.getHost(), uri.getPort(), uri.getPath(),
null, null);
+            URI key = new URI(uri.getScheme(), null, uri.getHost(), uri.getPort(), uri.getPath(),
uri.getQuery(), null);
             synchronized (this.visited) {
                 if (!this.visited.contains(key)) {
+                    logger.info(key.toString());
                     this.visited.add(key);
                     return task;
                 } else {



Mime
View raw message