diff options
Diffstat (limited to 'guava/src/com/google/common/util/concurrent/FakeTimeLimiter.java')
-rw-r--r-- | guava/src/com/google/common/util/concurrent/FakeTimeLimiter.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/guava/src/com/google/common/util/concurrent/FakeTimeLimiter.java b/guava/src/com/google/common/util/concurrent/FakeTimeLimiter.java index 1c16cfb14..0f8a17894 100644 --- a/guava/src/com/google/common/util/concurrent/FakeTimeLimiter.java +++ b/guava/src/com/google/common/util/concurrent/FakeTimeLimiter.java @@ -77,12 +77,13 @@ public final class FakeTimeLimiter implements TimeLimiter { } @Override + @SuppressWarnings("CatchingUnchecked") // sneaky checked exception public void runWithTimeout(Runnable runnable, long timeoutDuration, TimeUnit timeoutUnit) { checkNotNull(runnable); checkNotNull(timeoutUnit); try { runnable.run(); - } catch (RuntimeException e) { + } catch (Exception e) { // sneaky checked exception throw new UncheckedExecutionException(e); } catch (Error e) { throw new ExecutionError(e); |