[ 
https://issues.jboss.org/browse/CDITCK-223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pete Muir updated CDITCK-223:
-----------------------------

    Fix Version/s: 1.0.5.CR1


Confirmed. Exclude list updated.

> EnterpriseBeanLifecycleTest.testCreateSFSB
> ------------------------------------------
>
>                 Key: CDITCK-223
>                 URL: https://issues.jboss.org/browse/CDITCK-223
>             Project: CDI TCK
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Tests
>    Affects Versions: 1.0.4.Final
>            Reporter: David Blevins
>             Fix For: 1.0.5.CR1
>
>
> This test is good except the last part where it checks for Serializable as an 
> interface:
> {code}
>       // Verify that the instance returned is a proxy by checking for all 
> local interfaces
>       assert getCurrentConfiguration().getBeans().isProxy(stadtInstance);
>       Set<Class> interfaces = new 
> HashSet<Class>(Arrays.asList(stadtInstance.getClass().getInterfaces()));
>       Class c = stadtInstance.getClass();
>       Class[] cs = c.getInterfaces();
>       assert interfaces.contains(KleinStadt.class);
>       assert interfaces.contains(SchoeneStadt.class);
>       assert interfaces.contains(Serializable.class);
> {code}
> It isn't valid to check Serializable is a business local interface.  Remote 
> proxies are required to be serializable, but there's no explicit requirement 
> for local proxies.  Most vendors may do that for internal purposes (makes 
> supporting passivation easier), but that's not something CDI needs to worry 
> about.
> Our proxies actually are serializable -- they just don't implement the 
> interface directly.  It's done through another internal interface that takes 
> care of a few other details, so this assert fails.  On that note, we should 
> probably change these asserts to:
> {code}
>       // Verify that the instance returned is a proxy by checking for all 
> local interfaces
>       assert getCurrentConfiguration().getBeans().isProxy(stadtInstance);
>       assert stadtInstance instanceof KleinStadt;
>       assert stadtInstance instanceof SchoeneStadt;
> {code}
> Probably CDI doesn't need to care about the details on how the vendor ensures 
> a proxy is assignable to the business local interfaces.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
weld-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/weld-issues

Reply via email to