[seam-dev] Seam3: Will injection become available with in final methods?
Michael Schütz
michaelschuetz83 at gmail.com
Thu Jun 3 04:06:22 EDT 2010
Hi to all,
in Seam2, using injected member within final method will cause an NPE at
Runtime. The reason for that is, that Seam2 uses cglib for dynamic proxying
und subclassing is not possible for final methods.
Example:
@Name("simpleSeamComp")
public class SimpleSeamComponent {
public String getName() {
return "Sam";
}
}
@Name("finalSeamComp")
public class FinalSeamComponent {
@In(create = true)
private SimpleSeamComponent simpleSeamComp;
// causes NullPointerException
public final String getHello() {
return simpleSeamComp.getName();
}
}
How will Seam3/CDI behave in that case?
Thanks and regards
Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/seam-dev/attachments/20100603/6b6479d3/attachment.html
More information about the seam-dev
mailing list