|
17 | 17 |
|
18 | 18 | import java.io.IOException; |
19 | 19 | import java.util.HashMap; |
20 | | -import java.util.Iterator; |
21 | 20 | import java.util.List; |
22 | 21 | import java.util.Map; |
23 | 22 |
|
@@ -83,13 +82,7 @@ public void testDatabaseEvents() throws IOException { |
83 | 82 | List<EventLogEntry> eventLogEntries = managementService.getEventLogEntries(null, null); |
84 | 83 |
|
85 | 84 | String processDefinitionId = processInstance.getProcessDefinitionId(); |
86 | | - Iterator<EventLogEntry> iterator = eventLogEntries.iterator(); |
87 | | - while (iterator.hasNext()) { |
88 | | - EventLogEntry entry = iterator.next(); |
89 | | - if (entry.getProcessDefinitionId() != null && !entry.getProcessDefinitionId().equals(processDefinitionId)) { |
90 | | - iterator.remove(); |
91 | | - } |
92 | | - } |
| 85 | + eventLogEntries.removeIf(entry -> entry.getProcessDefinitionId() != null && !entry.getProcessDefinitionId().equals(processDefinitionId)); |
93 | 86 |
|
94 | 87 | assertThat(eventLogEntries).hasSize(15); |
95 | 88 |
|
@@ -501,13 +494,7 @@ public void testDatabaseEventsNoTenant() throws IOException { |
501 | 494 | List<EventLogEntry> eventLogEntries = managementService.getEventLogEntries(null, null); |
502 | 495 |
|
503 | 496 | String processDefinitionId = processInstance.getProcessDefinitionId(); |
504 | | - Iterator<EventLogEntry> iterator = eventLogEntries.iterator(); |
505 | | - while (iterator.hasNext()) { |
506 | | - EventLogEntry entry = iterator.next(); |
507 | | - if (entry.getProcessDefinitionId() != null && !entry.getProcessDefinitionId().equals(processDefinitionId)) { |
508 | | - iterator.remove(); |
509 | | - } |
510 | | - } |
| 497 | + eventLogEntries.removeIf(entry -> entry.getProcessDefinitionId() != null && !entry.getProcessDefinitionId().equals(processDefinitionId)); |
511 | 498 |
|
512 | 499 | assertThat(eventLogEntries).hasSize(15); |
513 | 500 |
|
|
0 commit comments