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

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

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.0.M5
    • Fix Version/s: 4.0.B1
    • Component/s: None
    • Labels:
      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

            • Assignee:
              andrus Andrus Adamchik
              Reporter:
              andrus Andrus Adamchik
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: