周梦康 发表于 2016-07-11 2518 次浏览 标签 : Java
java.util.ConcurrentModificationException
	at java.util.HashMap$EntrySpliterator.forEachRemaining(HashMap.java:1688)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
	at com.aliyun.yq.service.FrequencyService.add(FrequencyService.java:53)
	at com.aliyun.yq.service.MessageService.sendMessage(MessageService.java:134)
	at com.aliyun.yq.netty.WebSocketServerHandler.broadcast(WebSocketServerHandler.java:160)


评论列表

回复 康哥 2016-07-11 21:12:58
我先用ConcurrentHashMap试试看