Fix NPE in account service
This commit is contained in:
parent
d68131ac00
commit
6814230193
1 changed files with 6 additions and 4 deletions
|
@ -249,10 +249,12 @@ public class AccountService {
|
|||
if (auth != null) {
|
||||
List<Event> events = auditProvider.createQuery().event(AUDIT_EVENTS).user(auth.getUser().getId()).maxResults(30).getResultList();
|
||||
for (Event e : events) {
|
||||
Iterator<Map.Entry<String, String>> itr = e.getDetails().entrySet().iterator();
|
||||
while (itr.hasNext()) {
|
||||
if (!AUDIT_DETAILS.contains(itr.next().getKey())) {
|
||||
itr.remove();
|
||||
if (e.getDetails() != null) {
|
||||
Iterator<Map.Entry<String, String>> itr = e.getDetails().entrySet().iterator();
|
||||
while (itr.hasNext()) {
|
||||
if (!AUDIT_DETAILS.contains(itr.next().getKey())) {
|
||||
itr.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue