History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEA-16279
Type: New Feature New Feature
Status: Open Open
Assignee: Dmitry Avdeev
Reporter: Taras Tielkes
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
IDEA: Feedback

Inspection to flag parent/child context bean overriding

Created: 09 Nov 07 15:55   Updated: 09 Nov 07 16:12
Component/s: Code Analysis. Inspection, J2EE.Spring

Build: 7,531


 Description  « Hide
When using a parent/child ApplicationContext setup (as is very common for web apps using spring), it's possible to override a bean from a parent context by a bean in a child context.

Almost always it is possible to use a cleaner solution, like giving parent bean and overriding bean unique names.
From time to time I see others (and myself) making the mistake of declaring a bean in a child context that overrides a bean in a parent context by mistake.

It would be valuable to have an inspection that flags any bean that overrides another bean (with same name) in a ancestor context.
Default level would be "warning".

Warning message should be descriptive enough too make clear where the overridden bean resides: for example "bean <current bean name> overrides bean with same name in parent fileset <overridden bean fileset name> (<name of file containing overridden bean>)"



 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.