[weld-issues] [JBoss JIRA] Commented: (CDITCK-186) TCK does not properly test for inhertance of observer methods

David Jencks (JIRA) jira-events at lists.jboss.org
Mon Dec 13 17:09:52 EST 2010


    [ https://issues.jboss.org/browse/CDITCK-186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12569791#comment-12569791 ] 

David Jencks commented on CDITCK-186:
-------------------------------------

I don't understand rev 7072.  If this test is incorrect, shouldn't  testObserverMethodNotOnManagedOrSessionBeanFails(org.jboss.jsr299.tck.tests.event.broken.observer.beanNotManaged.ObserverMethodOnIncorrectBeanTest) be excluded from 1.0.1-Final?  If that test in 1.0.1-Final is correct with the two bean classes present, why were the two classes removed?

> TCK does not properly test for inhertance of observer methods
> -------------------------------------------------------------
>
>                 Key: CDITCK-186
>                 URL: https://issues.jboss.org/browse/CDITCK-186
>             Project: CDI TCK
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 1.0.2.CR2
>            Reporter: Igor Vaynberg
>              Labels: cdi_4_2, eventing, eventlistener, events
>             Fix For: 1.0.2.CR3
>
>
> EventTest has a bug in it. According to section 4.2 of the spec
> {code}
> If X declares an initializer, non-static observer, @PostConstruct or @PreDestroy method x() then
> Y inherits x() if and only if neither Y nor any intermediate class that is a subclass of X and a
> superclass of Y overrides the method x().
> {code}
> both IntermediateStockWatcher and IndirectStockWatcher which extend StockWatcher should inherit its observer method:
> {code}
> StockWatcher#public void observeStockPrice(@Observes StockPrice price)
> {code}
> However, EventTest on line 149 asserts there is only one observer method, when in fact there should be three:
> {code}
> 147: StockPrice price = new StockPrice();
> 148: Set<ObserverMethod<? super StockPrice>> observers = getCurrentManager().resolveObserverMethods(price);
> 149: assert observers.size() == 1;
> {code}

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

        


More information about the weld-issues mailing list