Fix NPE in account service

This commit is contained in:
Stian Thorgersen 2014-05-21 12:13:00 +01:00
parent d68131ac00
commit 6814230193

View file

@ -249,6 +249,7 @@ 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) {
if (e.getDetails() != null) {
Iterator<Map.Entry<String, String>> itr = e.getDetails().entrySet().iterator();
while (itr.hasNext()) {
if (!AUDIT_DETAILS.contains(itr.next().getKey())) {
@ -256,6 +257,7 @@ public class AccountService {
}
}
}
}
account.setEvents(events);
}
return forwardToPage("log", AccountPages.LOG);