Skip to content

Commit ca1fbe5

Browse files
committed
more consistent interrupt state restoration
1 parent 77f0a01 commit ca1fbe5

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/main/java/org/apache/commons/lang3/concurrent/BackgroundInitializer.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,11 @@ public synchronized boolean isInitialized() {
345345
try {
346346
future.get();
347347
return true;
348-
} catch (CancellationException | ExecutionException | InterruptedException e) {
348+
} catch (CancellationException | ExecutionException e) {
349+
return false;
350+
} catch (InterruptedException e) {
351+
// reset interrupted state
352+
Thread.currentThread().interrupt();
349353
return false;
350354
}
351355
}

0 commit comments

Comments
 (0)