Find collection lookups with an argument that can never match
ProprietaryMarks a call such as Collection.contains(Object), Map.get(Object) or List.indexOf(Object) whose argument's type can never be cast to the collection's element, key or value type, as in List<String>.contains(1). Such a call never finds, matches or removes anything. containsAll, removeAll and retainAll compare the element types of both collections. Calls are not marked when a raw type, an unbounded wildcard or type variable, an intersection type, or a type missing from the classpath is involved.
io. moderne. staticanalysis. FindCollectionIncompatibleTypemod run . --recipe= io. moderne. staticanalysis. FindCollectionIncompatibleTypeInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.