Part of #423: Race condition potential in ApplicationManager concurrent operations
Problem
Line 974 already uses snapshot-based iteration (copying the collection before iterating), but this pattern is not applied consistently across all methods that iterate over shared state. Inconsistent use means some iteration paths are still vulnerable to ConcurrentModificationException or missed/duplicate processing.
Location
- platform-core/src/main/java/org/flossware/platform/core/ApplicationManager.java
Tasks
- Audit all iteration points over the applications map and listener collections
- Ensure every iteration uses a snapshot (defensive copy) before iterating
- Verify that snapshots are taken while holding the appropriate lock
- Add unit tests verifying iteration safety under concurrent modification
Acceptance Criteria
- All iterations over shared collections use snapshot-based patterns
- No ConcurrentModificationException possible during iteration
- Snapshots are taken atomically under the correct lock
Reactions are currently unavailable
Part of #423: Race condition potential in ApplicationManager concurrent operations
Problem
Line 974 already uses snapshot-based iteration (copying the collection before iterating), but this pattern is not applied consistently across all methods that iterate over shared state. Inconsistent use means some iteration paths are still vulnerable to ConcurrentModificationException or missed/duplicate processing.
Location
Tasks
Acceptance Criteria