Uploaded image for project: 'CDI TCK'
  1. CDI TCK
  2. CDITCK-186

TCK does not properly test for inhertance of observer methods

XMLWordPrintable

      EventTest has a bug in it. According to section 4.2 of the spec

      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().
      

      both IntermediateStockWatcher and IndirectStockWatcher which extend StockWatcher should inherit its observer method:

      StockWatcher#public void observeStockPrice(@Observes StockPrice price)
      

      However, EventTest on line 149 asserts there is only one observer method, when in fact there should be three:

      147: StockPrice price = new StockPrice();
      148: Set<ObserverMethod<? super StockPrice>> observers = getCurrentManager().resolveObserverMethods(price);
      149: assert observers.size() == 1;
      

            Unassigned Unassigned
            igor.vaynberg Igor Vaynberg (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: