incubator-droids-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thors...@apache.org
Subject svn commit: r1452558 - in /incubator/droids/branches/0.2.x-cleanup: droids-crawler/src/main/java/org/apache/droids/crawler/ droids-crawler/src/test/java/org/apache/droids/crawler/ droids-walker/src/main/java/org/apache/droids/walker/ droids-walker/src/...
Date Mon, 04 Mar 2013 22:00:51 GMT
Author: thorsten
Date: Mon Mar  4 22:00:51 2013
New Revision: 1452558

URL: http://svn.apache.org/r1452558
Log:
Allow that the start method can throw droidsExceptions

Modified:
    incubator/droids/branches/0.2.x-cleanup/droids-crawler/src/main/java/org/apache/droids/crawler/SimpleCrawlingDroid.java
    incubator/droids/branches/0.2.x-cleanup/droids-crawler/src/test/java/org/apache/droids/crawler/CrawlingDroidTest.java
    incubator/droids/branches/0.2.x-cleanup/droids-walker/src/main/java/org/apache/droids/walker/SimpleWalkingDroid.java
    incubator/droids/branches/0.2.x-cleanup/droids-walker/src/test/java/org/apache/droids/walker/WalkingDroidTest.java

Modified: incubator/droids/branches/0.2.x-cleanup/droids-crawler/src/main/java/org/apache/droids/crawler/SimpleCrawlingDroid.java
URL: http://svn.apache.org/viewvc/incubator/droids/branches/0.2.x-cleanup/droids-crawler/src/main/java/org/apache/droids/crawler/SimpleCrawlingDroid.java?rev=1452558&r1=1452557&r2=1452558&view=diff
==============================================================================
--- incubator/droids/branches/0.2.x-cleanup/droids-crawler/src/main/java/org/apache/droids/crawler/SimpleCrawlingDroid.java
(original)
+++ incubator/droids/branches/0.2.x-cleanup/droids-crawler/src/main/java/org/apache/droids/crawler/SimpleCrawlingDroid.java
Mon Mar  4 22:00:51 2013
@@ -24,6 +24,7 @@ import java.util.Queue;
 
 import com.google.common.base.Preconditions;
 
+import org.apache.droids.core.DroidsException;
 import org.apache.droids.core.LinkedTask;
 import org.apache.droids.core.TaskMaster;
 import org.apache.droids.core.Worker;
@@ -38,7 +39,7 @@ public class SimpleCrawlingDroid extends
     }
 
     @Override
-    public void start() {
+    public void start() throws DroidsException {
         Preconditions.checkState(initialLocations != null || !initialLocations.isEmpty(),
                 "CrawlingDroid requires at least one starting file");
         for (String location : initialLocations) {

Modified: incubator/droids/branches/0.2.x-cleanup/droids-crawler/src/test/java/org/apache/droids/crawler/CrawlingDroidTest.java
URL: http://svn.apache.org/viewvc/incubator/droids/branches/0.2.x-cleanup/droids-crawler/src/test/java/org/apache/droids/crawler/CrawlingDroidTest.java?rev=1452558&r1=1452557&r2=1452558&view=diff
==============================================================================
--- incubator/droids/branches/0.2.x-cleanup/droids-crawler/src/test/java/org/apache/droids/crawler/CrawlingDroidTest.java
(original)
+++ incubator/droids/branches/0.2.x-cleanup/droids-crawler/src/test/java/org/apache/droids/crawler/CrawlingDroidTest.java
Mon Mar  4 22:00:51 2013
@@ -1,5 +1,6 @@
 package org.apache.droids.crawler;
 
+import org.apache.droids.core.DroidsException;
 import org.apache.droids.core.LinkedTask;
 import org.apache.droids.core.SimpleTaskQueueWithHistory;
 import org.apache.droids.core.TaskMaster;
@@ -36,7 +37,7 @@ public class CrawlingDroidTest {
     }
 
     @Test
-    public void test() throws IOException {
+    public void test() throws IOException, DroidsException {
         this.testserver.register("*", new ResourceHandler());
         this.testserver.start();
 

Modified: incubator/droids/branches/0.2.x-cleanup/droids-walker/src/main/java/org/apache/droids/walker/SimpleWalkingDroid.java
URL: http://svn.apache.org/viewvc/incubator/droids/branches/0.2.x-cleanup/droids-walker/src/main/java/org/apache/droids/walker/SimpleWalkingDroid.java?rev=1452558&r1=1452557&r2=1452558&view=diff
==============================================================================
--- incubator/droids/branches/0.2.x-cleanup/droids-walker/src/main/java/org/apache/droids/walker/SimpleWalkingDroid.java
(original)
+++ incubator/droids/branches/0.2.x-cleanup/droids-walker/src/main/java/org/apache/droids/walker/SimpleWalkingDroid.java
Mon Mar  4 22:00:51 2013
@@ -18,6 +18,7 @@ package org.apache.droids.walker;
 
 import com.google.common.base.Preconditions;
 import org.apache.droids.core.AbstractDroid;
+import org.apache.droids.core.DroidsException;
 import org.apache.droids.core.TaskMaster;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -34,7 +35,7 @@ public class SimpleWalkingDroid extends 
     }
 
     @Override
-    public void start() {
+    public void start() throws DroidsException {
         Preconditions.checkState(initialFiles != null,
                 "FileWalker requires at least one starting file");
         Preconditions.checkState(!initialFiles.isEmpty(),

Modified: incubator/droids/branches/0.2.x-cleanup/droids-walker/src/test/java/org/apache/droids/walker/WalkingDroidTest.java
URL: http://svn.apache.org/viewvc/incubator/droids/branches/0.2.x-cleanup/droids-walker/src/test/java/org/apache/droids/walker/WalkingDroidTest.java?rev=1452558&r1=1452557&r2=1452558&view=diff
==============================================================================
--- incubator/droids/branches/0.2.x-cleanup/droids-walker/src/test/java/org/apache/droids/walker/WalkingDroidTest.java
(original)
+++ incubator/droids/branches/0.2.x-cleanup/droids-walker/src/test/java/org/apache/droids/walker/WalkingDroidTest.java
Mon Mar  4 22:00:51 2013
@@ -1,6 +1,7 @@
 package org.apache.droids.walker;
 
 import org.apache.droids.taskmaster.SequentialTaskMaster;
+import org.apache.droids.core.DroidsException;
 import org.apache.droids.core.TaskMaster;
 import org.apache.droids.filter.RegexURLFilter;
 import org.apache.droids.handle.SysoutHandler;
@@ -15,7 +16,7 @@ import java.util.*;
 public class WalkingDroidTest {
 
     @Test
-    public void testWalkingDroid() throws NullPointerException {
+    public void testWalkingDroid() throws NullPointerException, DroidsException {
         Queue<FileTask> queue = new LinkedList<FileTask>();
         TaskMaster<FileTask> taskMaster = new SequentialTaskMaster<FileTask>();
 
@@ -38,7 +39,7 @@ public class WalkingDroidTest {
     }
 
     @Test
-    public void testFilteredWalkingDroid() {
+    public void testFilteredWalkingDroid() throws DroidsException {
         Queue<FileTask> queue = new LinkedList<FileTask>();
         TaskMaster<FileTask> taskMaster = new SequentialTaskMaster<FileTask>();
 



Mime
View raw message