[hdpowerview] Fix SAT warning (#12365)

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
This commit is contained in:
Jacob Laursen 2022-02-23 22:39:18 +01:00 committed by GitHub
parent 673397b826
commit 0b992cd50b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -561,10 +561,10 @@ public class HDPowerViewWebTargets {
ContentResponse response;
try {
response = request.send();
} catch (InterruptedException | TimeoutException | ExecutionException e) {
if (e instanceof InterruptedException) {
Thread.currentThread().interrupt();
}
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new HubProcessingException(String.format("%s: \"%s\"", e.getClass().getName(), e.getMessage()));
} catch (TimeoutException | ExecutionException e) {
if (Instant.now().isBefore(maintenanceScheduledEnd)) {
// throw "softer" exception during maintenance window
logger.debug("Hub still undergoing maintenance");