[
http://jira.jboss.com/jira/browse/JBSEAM-808?page=all ]
Norman Richards updated JBSEAM-808:
-----------------------------------
Fix Version/s: 2.1.0.GA
(was: 2.1.0.A1)
StatckOverflowError if factory specifies it's component
-------------------------------------------------------
Key: JBSEAM-808
URL:
http://jira.jboss.com/jira/browse/JBSEAM-808
Project: JBoss Seam
Issue Type: Bug
Environment: Latest from CVS
Reporter: John Ray
Fix For: 2.1.0.GA
I accidently specified the name of my component instead of a context variable and this
resulted in a StatckOverflowError. For example
@Stateful
@Name("foo")
@Scope(ScopeType.EVENT)
public class FooAction implements Foo {
@Out("bar")
private String bar;
@Factory("foo")
public void initBar() {
...
}
}
I'd sugest changing the code in org.jboss.seam.Component at line 490 to include an
if/throw. I highlighted the 2 new lines with an asterisk
if ( method.isAnnotationPresent(org.jboss.seam.annotations.Factory.class) )
{
Init init = (Init) applicationContext.get(
Seam.getComponentName(Init.class) ); //can't use Init.instance() here 'cos of unit
tests
String contextVariable = toName(
method.getAnnotation(org.jboss.seam.annotations.Factory.class).value(), method );
* if (contextVariable.equals(name))
* throw new IllegalStateException("@Factory method can not be for
it's own component: " + name);
init.addFactoryMethod(contextVariable, method, this);
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira