]> git.basschouten.com Git - openhab-addons.git/commitdiff
[hdpowerview] Fix SAT warning (#12365)
authorJacob Laursen <jacob-github@vindvejr.dk>
Wed, 23 Feb 2022 21:39:18 +0000 (22:39 +0100)
committerGitHub <noreply@github.com>
Wed, 23 Feb 2022 21:39:18 +0000 (22:39 +0100)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
bundles/org.openhab.binding.hdpowerview/src/main/java/org/openhab/binding/hdpowerview/internal/HDPowerViewWebTargets.java

index 0c43befa9e06d460597783b2ad01cff8c2f542eb..d40ee5b91b31d62242f0f5c304eea93fdb89678d 100644 (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");