Consistently synchronize on this.monitor in InMemoryAuditEventRepository

See gh-6261
This commit is contained in:
Andy Wilkinson 2016-07-01 14:08:41 +01:00
parent 00a56cdf31
commit 5c6537c234
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ public class InMemoryAuditEventRepository implements AuditEventRepository {
@Override
public List<AuditEvent> find(String principal, Date after, String type) {
LinkedList<AuditEvent> events = new LinkedList<AuditEvent>();
synchronized (this.events) {
synchronized (this.monitor) {
for (int i = 0; i < this.events.length; i++) {
AuditEvent event = resolveTailEvent(i);
if (event != null && isMatch(principal, after, type, event)) {