Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.3.1.1
-
None
-
linux, jdk 1.6
Description
on core/src/main/java/org/apache/struts2/components/Bean.java line 128:
bean = objectFactory.buildBean(ClassLoaderUtil.loadClass(beanName, getClass()), stack.getContext());
Shouldn't this be:
bean = objectFactory.buildBean(beanName, stack.getContext(), false);
The factory knows how to get a Class from a String as well as anyone, but the "name" is not necessarily a class name when the bean is the id of a spring bean.
This affects s:bean tag.
AFAICT all versions are affected (just checked svn trunk).