REQ-2010: fix NPE
This commit is contained in:
parent
72a0c49ff1
commit
498cad19b4
@ -71,6 +71,9 @@ public class GeneralMessageOldServiceImpl implements GeneralMessageOldService {
|
||||
}
|
||||
|
||||
public int countUnread(Long personId, List<IdentityDTO> identities, List<Long> excludeMsgIds) {
|
||||
if (CollectionUtils.isEmpty(identities)) {
|
||||
return 0;
|
||||
}
|
||||
int count = 0;
|
||||
for (IdentityDTO identity : identities) {
|
||||
PersonDTO person = PersonDTO.from(personId, identity.getId(), identity.getType());
|
||||
|
||||
@ -42,7 +42,7 @@ public class GeneralMessageOldDataStatisticRequest implements Serializable {
|
||||
if (identityId != null && identityType != null) {
|
||||
return Collections.singletonList(new IdentityDTO(identityId, identityType));
|
||||
}
|
||||
return identities;
|
||||
return identities == null ? Collections.emptyList() : identities;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Loading…
Reference in New Issue
Block a user