mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-13 17:05: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();
|
||||
return new Thread(r, createName());
|
||||
}).get();
|
||||
} catch (InterruptedException | ExecutionException e) {
|
||||
throw new RuntimeException("failed to schedule runnable");
|
||||
} catch (InterruptedException ex) {
|
||||
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