SonarLint (v2.0.0) tells me to “use collection interfaces” on an EnumMap.
The offending code:
EnumMap<BountyType, Integer> completions
Which displays: “Declarations should use Java collection interfaces such as “List” rather than specific implementation classes such as “LinkedList” (java:S1319)”
Map is not applicable here: It causes a type mismatch (for obvious reasons)
Presumably the class field completions is declared as specific type EnumMap<...> as well. If only the type of the constructor parameter completions is changed to Map<...>, there will be a type mismatch, because it cannot be guaranteed that the argument is an EnumMap. The field needs to be a Map, too.