From fc5a53ce919e8d5d8135967fbfc0ae3b9dcdb7dc Mon Sep 17 00:00:00 2001 From: pabloFuente Date: Thu, 8 Jul 2021 18:36:43 +0200 Subject: [PATCH] openvidu-server: no more sintactic sugar --- .../java/io/openvidu/server/rpc/RpcNotificationService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openvidu-server/src/main/java/io/openvidu/server/rpc/RpcNotificationService.java b/openvidu-server/src/main/java/io/openvidu/server/rpc/RpcNotificationService.java index a197d4de..f0f0d911 100644 --- a/openvidu-server/src/main/java/io/openvidu/server/rpc/RpcNotificationService.java +++ b/openvidu-server/src/main/java/io/openvidu/server/rpc/RpcNotificationService.java @@ -75,7 +75,7 @@ public class RpcNotificationService { try { t.sendResponse(result); } catch (KurentoException e) { - if (e.getCause().getClass().equals(java.lang.IllegalStateException.class)) { + if (e.getCause() instanceof IllegalStateException) { log.warn("Response couldn't be sent to participant with privateId {}: {}", participantPrivateId, e.getCause().getMessage()); } else { @@ -118,7 +118,7 @@ public class RpcNotificationService { try { s.sendNotification(method, params); } catch (KurentoException e) { - if (e.getCause().getClass().equals(java.lang.IllegalStateException.class)) { + if (e.getCause() instanceof IllegalStateException) { log.warn("Notification '{}' couldn't be sent to participant with privateId {}: {}", method, participantPrivateId, e.getCause().getMessage()); } else {