Browse Source
Merge pull request #93 from yu1183688986/wvp-28181-2.0
修复集合遍历删除元素的java.util.ConcurrentModificationException 异常问题
pull/110/head
648540858
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
7 additions and
4 deletions
-
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookSubscribe.java
|
|
@ -63,7 +63,7 @@ public class ZLMHttpHookSubscribe { |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
if (result) { |
|
|
|
if (null != result && result) { |
|
|
|
event = eventMap.get(key); |
|
|
|
} |
|
|
|
} |
|
|
@ -75,7 +75,10 @@ public class ZLMHttpHookSubscribe { |
|
|
|
if (eventMap == null) { |
|
|
|
return; |
|
|
|
} |
|
|
|
for (JSONObject key : eventMap.keySet()) { |
|
|
|
Iterator<Map.Entry<JSONObject, Event>> iterator = eventMap.entrySet().iterator(); |
|
|
|
while (iterator.hasNext()){ |
|
|
|
Map.Entry<JSONObject, Event> next = iterator.next(); |
|
|
|
JSONObject key = next.getKey(); |
|
|
|
Boolean result = null; |
|
|
|
for (String s : key.keySet()) { |
|
|
|
if (result == null) { |
|
|
@ -85,8 +88,8 @@ public class ZLMHttpHookSubscribe { |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
if (result) { |
|
|
|
eventMap.remove(key); |
|
|
|
if (null != result && result){ |
|
|
|
iterator.remove(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|