accessibility feature on bean definitions [SPR-5882] #10552
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
Costin Leau opened SPR-5882 and commented
In some environments, it makes sense to use only publicly accessible methods(factory methods), constructors or classes. In other words, the usage of setAccessible() should be forbidden when using XML configurations (i.e. declaring a configuration outside the target classes as opposed to annotations which are bound to them).
It would be useful to have such a flag (shouldUseAccessible()) available on bean definitions so the parsers can define this behaviour when needed.
When set, the container would just disregard any non-public reflection items that would otherwise consider.
Affects: 3.0 M3
Referenced from: commits 7eabd2d
The text was updated successfully, but these errors were encountered: