Apache Nutch is an extensible and scalable web crawler
NUTCH-399 Change CommandRunner to use concurrent api from jdk
Sami Siren0324f1f0ca8b
diff --git a/lib/concurrent-1.3.4.LICENSE.txt b/lib/concurrent-1.3.4.LICENSE.txtdeleted file mode 100644index 7ee894ccb..000000000--- a/lib/concurrent-1.3.4.LICENSE.txt+++ /dev/null@@ -1,33 +0,0 @@-http://creativecommons.org/licenses/publicdomain/--creative commons Public Domain Dedication--Copyright-Only Dedication (based on United States law) or Public Domain-Certification--The person or persons who have associated work with this document (the-"Dedicator" or "Certifier") hereby either (a) certifies that, to the best-of his knowledge, the work of authorship identified is in the public-domain of the country from which the work is published, or (b) hereby-dedicates whatever copyright the dedicators holds in the work of authorship-identified below (the "Work") to the public domain. A certifier, morever,-dedicates any copyright interest he may have in the associated work, and-for these purposes, is described as a "dedicator" below.--A certifier has taken reasonable steps to verify the copyright status of-this work. Certifier recognizes that his good faith efforts may not shield-him from liability if in fact the work certified is not in the public domain.--A dedicator makes this dedication for the benefit of the public at large and-to the detriment of the Dedicator's heirs and successors. Dedicators intend-this dedication to be an overt act of relinquishment in perpetuity of all-present and future rights under copyright law, whether vested or contingent,-in the Work. Dedicator understand that such relinquishment of all rights-includes the relinquishment of all rights to enforce (by lawsuit or otherwise)-those copyrights in the Work.--Dedicator recognizes that, once placed in the public domain, the Work may be-freely reproduced, distributed, transmitted, used, modified, built upon, or-otherwise exploited by anyone for any purpose, commercial or non-commercial,-and in any way, including by methods that have not yet been invented or-conceived.diff --git a/lib/concurrent-1.3.4.jar b/lib/concurrent-1.3.4.jardeleted file mode 100644index a3cf16105..000000000Binary files a/lib/concurrent-1.3.4.jar and /dev/null differdiff --git a/src/java/org/apache/nutch/util/CommandRunner.java b/src/java/org/apache/nutch/util/CommandRunner.javaindex 1474c5350..2140b39cd 100644--- a/src/java/org/apache/nutch/util/CommandRunner.java+++ b/src/java/org/apache/nutch/util/CommandRunner.java@@ -33,10 +33,10 @@ import java.io.IOException;import java.io.InputStream;import java.io.OutputStream;import java.io.InterruptedIOException;--import EDU.oswego.cs.dl.util.concurrent.BrokenBarrierException;-import EDU.oswego.cs.dl.util.concurrent.CyclicBarrier;-import EDU.oswego.cs.dl.util.concurrent.TimeoutException;+import java.util.concurrent.BrokenBarrierException;+import java.util.concurrent.CyclicBarrier;+import java.util.concurrent.TimeUnit;+import java.util.concurrent.TimeoutException;public class CommandRunner {@@ -116,9 +116,9 @@ public class CommandRunner {//try {if (_timeout == 0) {- _barrier.barrier(); // JDK 1.5: // _barrier.await();+ _barrier.await();} else {- _barrier.attemptBarrier(_timeout * 1000); // JDK 1.5: // _barrier.await(_timeout, TimeUnit.SECONDS);+ _barrier.await(_timeout, TimeUnit.SECONDS);}} catch (TimeoutException ex) {_timedout = true;@@ -217,7 +217,7 @@ public class CommandRunner {}}try {- _barrier.barrier();+ _barrier.await();} catch (InterruptedException ie) {/* IGNORE */} catch (BrokenBarrierException bbe) {