Could Error prone check for a Collection.contains call followed by an immediate Collection.remove call?
I see a fair amount of
if (myList.contains(value)) {
myList.remove(value);
// Do something.
}
which could be
if (myList.remove(value)) {
// Do something.
}
Or add (on Set)! Or put (on Map)!
This is internally covered in the tools alluded to in #649 which we are working on getting open sourced.
Most helpful comment
Or
add(onSet)! Orput(onMap)!