False Positive On DMC_DUBIOUS_MAP_COLLECTION
From Comment : https://github.com/checkstyle/checkstyle/pull/17312#issuecomment-3033784610
The SpotBugs fb-contrib extension reports a false positive for DMC_DUBIOUS_MAP_COLLECTION, suggesting that a Map should be replaced with a List. However, in this case, the Map is intentionally used to enable efficient key-based lookups, which a List cannot provide. The current structure is necessary and aligns with the actual usage pattern, so no change is needed.
I ran spotbugs/sb-contrib against the master branch of checkstyle, and didn't see the issue, sb-contrib notices that in resolveEntity() a get call is used, and correctly no longer considers the map as a possible candidate.
Is there some other branch you are using that shows this?