Unassignable injection point type in XML application context
Reports invalid injection point types (properties and constructor arguments).
The following injection point types are allowed: ref
, idref
, any collection type, inner beans, and so on.
Example:
public class InjectionValueTypes{
public List<MyBean> setListBeans() {...}
public MyBean setMyBean() {...}
}
}
<beans>
<bean class="MyBean" id="myBean"/>
<bean class="ErrTypeBean" id="errTypeBean"/>
<bean class="InjectionValueTypes" id="kt">
<property name="myBean" ref="errTypeBean"/>
<!-- reports "Property of 'MyBean' type cannot be injected by 'ErrTypeBean'" -->
<property name="listBeans">
<list>
<idref local="myBean"/>
<ref bean="myBean"/>
<ref bean="errTypeBean"/> <!-- reports "Cannot be added in collection of 'MyBean' type" -->
<bean class="ErrTypeBean"/> <!-- reports "Bean must be of 'MyBean' type" -->
</list>
</property>
</bean>
</beans>
Locating this inspection
- By ID
Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.
InjectionValueTypeInspection- Via Settings dialog
Path to the inspection settings via IntelliJ Platform IDE Settings dialog, when you need to adjust inspection settings directly from your IDE.
Inspection Details | |
---|---|
By default bundled with: | |
Can be installed with plugin: | Spring, 242.22892 |
Last modified: 11 September 2024