I like this inspection "Collection declared by class, not interface", but it would be 10X more useful if it was 100% accurate and offer a quickfix.
Currently I will see a warning like this:
"Declaration of HashMap should probably be weakened to 'Map'"
The warning is very wishy-washy because the inspection does not check to see
if any of the accessors of the variable are using methods declared only in the concrete class and not available in the superclass.
I realize doing all the checks could be expensive but this is exatly the kind
of work I want IDEA to do for me automatically.
Also, as far as I know there is no refactoring for me to automate changing the
type from HashMap to Map or Vector to List, etc. It would be great if there was
a quickfix available to automate this.
Here is a Related Jira:
IG: 'Declaration should probably be weakened' triggers incorrectly