mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-14 09:25:43 +01:00
do not ignore InterruptedException, re-interrupt method instead
This commit is contained in:
@@ -30,8 +30,11 @@ class CronThreadFactory implements ThreadFactory, AutoCloseable {
|
|||||||
ThreadContext.remove();
|
ThreadContext.remove();
|
||||||
return new Thread(r, createName());
|
return new Thread(r, createName());
|
||||||
}).get();
|
}).get();
|
||||||
} catch (InterruptedException | ExecutionException e) {
|
} catch (InterruptedException ex) {
|
||||||
throw new RuntimeException("failed to schedule runnable");
|
Thread.currentThread().interrupt();
|
||||||
|
throw new IllegalStateException("failed to schedule runnable");
|
||||||
|
} catch (ExecutionException ex) {
|
||||||
|
throw new IllegalStateException("failed to schedule runnable");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user