From 0b992cd50b80b641b8ab253bceab3e4b25843470 Mon Sep 17 00:00:00 2001 From: Jacob Laursen Date: Wed, 23 Feb 2022 22:39:18 +0100 Subject: [PATCH] [hdpowerview] Fix SAT warning (#12365) Signed-off-by: Jacob Laursen --- .../hdpowerview/internal/HDPowerViewWebTargets.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bundles/org.openhab.binding.hdpowerview/src/main/java/org/openhab/binding/hdpowerview/internal/HDPowerViewWebTargets.java b/bundles/org.openhab.binding.hdpowerview/src/main/java/org/openhab/binding/hdpowerview/internal/HDPowerViewWebTargets.java index 0c43befa9..d40ee5b91 100644 --- a/bundles/org.openhab.binding.hdpowerview/src/main/java/org/openhab/binding/hdpowerview/internal/HDPowerViewWebTargets.java +++ b/bundles/org.openhab.binding.hdpowerview/src/main/java/org/openhab/binding/hdpowerview/internal/HDPowerViewWebTargets.java @@ -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");