You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because there is no concurrent access to results, using CopyOnWriteArrayList provides no benefit and introduces unnecessary write-cost overhead. A regular ArrayList is sufficient and more appropriate for this use case.
This is not a functional bug, but the current choice of collection does not match the actual access pattern of the readers.
Environment
Spring Batch version: 6.0.0
Java version: Java 21
Expected behavior
Since paging readers operate in a single-threaded, sequential manner, the internal list should use ArrayList instead of CopyOnWriteArrayList.