Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-4089

Improve IoC: creation of an object whose the constructor contains several time the same type of paramater should be possible.

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Won't Do
    • Icon: Neutral Neutral
    • 4.5.x
    • None
    • core
    • None

      For the moment the behavior is the following:
      It takes the first parameter that has the desired type.

      Ex:
      This is my constructor:
      public MyClass(String s1, String s2)

      when I create this object:
      Components.newInstance(MyClass.class, "fix","me")

      It returns an object containing:
      myClass

      • s1 = "fix"
      • s2 = "fix"

      Maybe we should improve something here CandidateParameterResolver#resolveParameter(ParameterInfo)

        Acceptance criteria

              Unassigned Unassigned
              sschmitt Samuel Schmitt
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Task DoR