Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-2326

DI: can't override List/Map elements from another Module

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.0.M5
    • 4.0.B1
    • None
    • None

    Description

      The following fails to load SubX instance into collection.

      Module m1 = new Module() {
      
          public void configure(Binder binder) {
              binder.bind(X.class).to(X.class);
              binder.bindList(Object.class, "xyz").add(X.class);
          }
      };
      
      Module m2 = new Module() {
          @Override
          public void configure(Binder binder) {
              binder.bind(X.class).to(SubX.class);
          }
      };
      
      DIBootstrap.createInjector(m1, m2);
      

      Attachments

        Activity

          People

            andrus Andrus Adamchik
            andrus Andrus Adamchik
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: