Skip to content
Snippets Groups Projects
Commit 71b504a2 authored by brinn's avatar brinn
Browse files

change: replace CheckedExceptionTunnel(InterruptedException) with StopException

SVN: 6524
parent df2049c3
No related branches found
No related tags found
No related merge requests found
...@@ -48,6 +48,7 @@ import org.apache.commons.lang.StringUtils; ...@@ -48,6 +48,7 @@ import org.apache.commons.lang.StringUtils;
import ch.systemsx.cisd.common.exceptions.CheckedExceptionTunnel; import ch.systemsx.cisd.common.exceptions.CheckedExceptionTunnel;
import ch.systemsx.cisd.common.exceptions.EnvironmentFailureException; import ch.systemsx.cisd.common.exceptions.EnvironmentFailureException;
import ch.systemsx.cisd.common.exceptions.StopException;
import ch.systemsx.cisd.common.logging.ISimpleLogger; import ch.systemsx.cisd.common.logging.ISimpleLogger;
import ch.systemsx.cisd.common.logging.LogLevel; import ch.systemsx.cisd.common.logging.LogLevel;
import ch.systemsx.cisd.common.parser.filter.AlwaysAcceptLineFilter; import ch.systemsx.cisd.common.parser.filter.AlwaysAcceptLineFilter;
...@@ -593,11 +594,7 @@ public final class FileUtilities ...@@ -593,11 +594,7 @@ public final class FileUtilities
{ {
return; return;
} }
if (Thread.interrupted()) StopException.check();
{
throw new CheckedExceptionTunnel(new InterruptedException(
"lastChanged() interrupted"));
}
traverse(entry); traverse(entry);
} }
} }
...@@ -647,8 +644,7 @@ public final class FileUtilities ...@@ -647,8 +644,7 @@ public final class FileUtilities
* file system. * file system.
* @throws CheckedExceptionTunnel of an {@link IOException} if the <var>path</var> does not * @throws CheckedExceptionTunnel of an {@link IOException} if the <var>path</var> does not
* exist or is not readable. * exist or is not readable.
* @throws CheckedExceptionTunnel of a {@link InterruptedException} if the thread that the * @throws StopException if the thread that the method runs in gets interrupted.
* method runs in gets interrupted.
*/ */
public static long lastChanged(final File path, final boolean subDirectoriesOnly, public static long lastChanged(final File path, final boolean subDirectoriesOnly,
final long stopWhenFindYounger) final long stopWhenFindYounger)
...@@ -675,8 +671,7 @@ public final class FileUtilities ...@@ -675,8 +671,7 @@ public final class FileUtilities
* file system. * file system.
* @throws CheckedExceptionTunnel of an {@link IOException} if the <var>path</var> does not * @throws CheckedExceptionTunnel of an {@link IOException} if the <var>path</var> does not
* exist or is not readable. * exist or is not readable.
* @throws CheckedExceptionTunnel of a {@link InterruptedException} if the thread that the * @throws StopException if the thread that the method runs in gets interrupted.
* method runs in gets interrupted.
*/ */
public static long lastChangedRelative(final File path, final boolean subDirectoriesOnly, public static long lastChangedRelative(final File path, final boolean subDirectoriesOnly,
final long stopWhenFindYoungerRelative) final long stopWhenFindYoungerRelative)
...@@ -690,8 +685,7 @@ public final class FileUtilities ...@@ -690,8 +685,7 @@ public final class FileUtilities
* file system. * file system.
* @throws CheckedExceptionTunnel of an {@link IOException} if the <var>path</var> does not * @throws CheckedExceptionTunnel of an {@link IOException} if the <var>path</var> does not
* exist or is not readable. * exist or is not readable.
* @throws CheckedExceptionTunnel of a {@link InterruptedException} if the thread that the * @throws StopException if the thread that the method runs in gets interrupted.
* method runs in gets interrupted.
*/ */
public static long lastChanged(final File path) public static long lastChanged(final File path)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment