mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
PersistentStorage, HybridStorage, and WalStorage used Stream.toList(), which returns an unmodifiable list in Java 16+. InMemoryStorage built an ArrayList, so callers that mutate the scan result work in unit tests (all using in-memory backend) but fail at runtime on persistent backends. This was the root cause of #482: CloudWatchLogsService.describeLogGroups calls result.sort(...) on the scan result, which throws UnsupportedOperationException when running against any non-memory store. Same latent bug at CloudWatchLogsService.getLogEvents and CognitoService.listGroups (callers copy into ArrayList first, so they happen to work). Rather than patch the two call sites, align all StorageBackend implementations on a documented "returns a new mutable list" contract. Tests added to each backend to lock in the behavior.