We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 95fc68b commit b2b8c86Copy full SHA for b2b8c86
operator-framework/src/main/java/io/javaoperatorsdk/operator/processing/EventBuffer.java
@@ -21,12 +21,7 @@ public boolean containsEvents(String customResourceId) {
21
22
public List<Event> getAndRemoveEventsForExecution(String resourceUid) {
23
List<Event> crEvents = events.remove(resourceUid);
24
- if (crEvents == null) {
25
- crEvents = Collections.emptyList();
26
- }
27
- List<Event> result = new ArrayList<>(crEvents);
28
- crEvents.clear();
29
- return result;
+ return crEvents == null ? Collections.emptyList() : crEvents;
30
}
31
32
public void cleanup(String resourceUid) {
0 commit comments