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