From 4d2c36edcd43d18e30c354bfb88ed2a9ff8e5a94 Mon Sep 17 00:00:00 2001 From: mk1990 <153958232@qq.com> Date: 星期三, 22 六月 2022 13:09:09 +0800 Subject: [PATCH] fix设备状态查询接口 --- src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookSubscribe.java | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookSubscribe.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookSubscribe.java index f7551c2..ffd8ec9 100644 --- a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookSubscribe.java +++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookSubscribe.java @@ -40,8 +40,7 @@ private Map<HookType, Map<JSONObject, ZLMHttpHookSubscribe.Event>> allSubscribes = new ConcurrentHashMap<>(); public void addSubscribe(HookType type, JSONObject hookResponse, ZLMHttpHookSubscribe.Event event) { - allSubscribes.computeIfAbsent(type, k -> new ConcurrentHashMap<>()) - .put(hookResponse, event); + allSubscribes.computeIfAbsent(type, k -> new ConcurrentHashMap<>()).put(hookResponse, event); } public ZLMHttpHookSubscribe.Event getSubscribe(HookType type, JSONObject hookResponse) { @@ -86,7 +85,9 @@ if (result == null) { result = key.getString(s).equals(hookResponse.getString(s)); }else { - if (key.getString(s) == null) continue; + if (key.getString(s) == null) { + continue; + } result = result && key.getString(s).equals(hookResponse.getString(s)); } } -- Gitblit v1.8.0