At the moment the inspection+quickfix for the classic, verbose
<ref bean="..."> style leaves "local" bean references alone.
This is a good default, as - strictly speaking - changing a "local" ref to a short normal ref (aka "bean ref") is a subtle change in semantics.
However, it would be nice to have an option on the inspection to shorten "local" <refs> as well.
The original motivation for "local" refs was to let the XML parser (through usage of IDREF in DTD) validate such references.
Since spring pre-instantiates singletons (and thus "validates" most bean references), the practical value of such a feature is minimal in my opinion - especially in this modern age of IDEs.
Request:
- Add configuration option to inspection "Spring Injection Value Style Inspection"
- Option label: something like "Shorten <ref local="...">"
- Default setting should be "off"
- When enabled, should apply to <ref local="abc"/> inside <constructor-arg>, <property>, <entry> and <key>