Use Collection interfaces

MSAL

Use Deque, List, Map, ConcurrentMap, Queue, and Set instead of implemented collections. Replaces the return type of public method declarations and the variable type public variable declarations. Programming to an interface rather than a concrete collection type decouples callers from a specific implementation, making it easier to swap data structures later without breaking dependent code.

org.openrewrite.staticanalysis.UseCollectionInterfaces
mod run . --recipe=org.openrewrite.staticanalysis.UseCollectionInterfaces

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.