Sonar fix: restore thread interrupted state

This commit is contained in:
Alex Herbert 2021-08-20 13:38:10 +01:00
parent 7813ecb115
commit 09dd29e56d
1 changed files with 2 additions and 0 deletions

View File

@ -124,6 +124,8 @@ public final class TravellingSalesmanSolver {
f.get();
}
} catch (InterruptedException | ExecutionException e) {
// Restore interrupted state...
Thread.currentThread().interrupt();
throw new RuntimeException(e);
}
// Terminate all threads.