Consistently synchronize on this.monitor in InMemoryAuditEventRepository
See gh-6261
This commit is contained in:
parent
00a56cdf31
commit
5c6537c234
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue