[
https://issues.jboss.org/browse/CDITCK-203?page=com.atlassian.jira.plugin...
]
Jozef Hartinger resolved CDITCK-203.
------------------------------------
Fix Version/s: (was: 1.0.4.Final)
(was: 1.1.0.CR1)
Resolution: Rejected
Marius Bogoevici wrote:
I don't see a particular issue with the test. The rules on what business method
invocations are and aren't should make it clear that invocations on the instance
acquired via getTarget() are intercepted, or, for that matter, decorated. Those are *not*
business method invocations (in the same way as calls to 'this' are not business
method invocations).
Section 7.2 of the CDI specification.
InvocationContextTest:testGetTarget
-----------------------------------
Key: CDITCK-203
URL:
https://issues.jboss.org/browse/CDITCK-203
Project: CDI TCK
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Tests
Affects Versions: 1.0.4.CR2
Reporter: Scott Ferguson
Assignee: Jozef Hartinger
This test has a implementation-dependency on how interception is
implemented (requires proxy implementation), but the proxy
implementation is not mandated by the spec (and the EJB spec has always
allowed both implementation methods.)
The test calls SimpleBean.getId(), which is intercepted by Interceptor1.
Interceptor1's aroundInvoke calls target.getId(), which is a circular
reference for extension and only works for proxy-based interception:
class SimpleBean {
@Interceptors(Interceptor1.class)
public int getId()
{
return id;
}
...
}
class Interceptor1 {
@AroundInvoke
public Object aroundInvoke(InvocationContext ctx) throws Exception
{
SimpleBean target = (SimpleBean) ctx.getTarget();
int id1 = target.getId();
...
}
}
The only change needed to the test is to create a SimpleBean.getBareId()
which is not an intercepted method.
(Or, if the spec is re-interpreted to require a proxy implementation,
there should be an explicit test for it, not an implicit dependency like
this test.)
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira