修复空指针异常
This commit is contained in:
@@ -79,7 +79,7 @@ public class EventPublisher {
|
|||||||
// 数据去重
|
// 数据去重
|
||||||
Set<String> gbIdSet = new HashSet<>();
|
Set<String> gbIdSet = new HashSet<>();
|
||||||
for (DeviceChannel deviceChannel : deviceChannels) {
|
for (DeviceChannel deviceChannel : deviceChannels) {
|
||||||
if (!gbIdSet.contains(deviceChannel.getChannelId())) {
|
if (deviceChannel != null && deviceChannel.getChannelId() != null && !gbIdSet.contains(deviceChannel.getChannelId())) {
|
||||||
gbIdSet.add(deviceChannel.getChannelId());
|
gbIdSet.add(deviceChannel.getChannelId());
|
||||||
channels.add(deviceChannel);
|
channels.add(deviceChannel);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user