2 Replies Latest reply on Feb 5, 2014 6:19 AM by Olexandr Demura

    Errai-CDI BootstrapperImpl registers beans even on invisible interfaces

    Olexandr Demura Newbie

      Errai-CDI BootstrapperImpl registers beans even on invisible interfaces,

      so compilation of this generated class fails.

       

      e.g. lets have

      public class MyTable extends CellTable<CashJournalEntry> {

         public MyTable() {}

      }

      @ApplicationScoped

      public class MyView {

      @Inject MyTable table;

        public MyView() {}

      }

       

      BootstrapperImpl.java would have invalid for compilation line among valid other

        /* ok */  injContext.addBean(MyTable.class, MyTable.class, inj1818_MyTable_creational, null, QualifierUtil.DEFAULT_QUALIFIERS, null, true);

        /* ok */  injContext.addBean(CellTable.class, MyTable.class, inj1818_MyTable_creational, null, QualifierUtil.DEFAULT_QUALIFIERS, null, true);

        /* fail */  injContext.addBean(TableSectionChangeHandler.class, MyTable.class, inj1818_MyTable_creational, null, QualifierUtil.DEFAULT_QUALIFIERS, null, false);

      where TableSectionChangeHandler is com.google.gwt.user.cellview.client.AbstractCellTable.TableSectionChangeHandler,

      which is protected interface inside public class AbstractCellTable.

       

      Is it a bug or is it required/expected by CDI spec and can it be work-arounded?