mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-10-06 17:29:19 +00:00
Consistently synchronize on this.monitor in InMemoryAuditEventRepository
See gh-6261
This commit is contained in:
+1
-1
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user