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

DefaultClassFactory.newInstance(Class<T>, Class<?>[], Object...) should not use invokeExactConstructor but invokeConstructor

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • 4.3
    • 4.3
    • None
    • None

      The method DefaultClassFactory.newInstance(Class<T>, Object...) calls ConstructorUtils.invokeConstructor(Class, Object[]) while this is not the case for DefaultClassFactory.newInstance(Class<T>, Class<?>[], Object...).

      This is especially a problem if you have more precise constructors in subclasses (especially if you use generics).

      Example: after introducing generics for models (MAGNOLIA-3081) the method AbstractRenderable.newModel(...) fails to find the correct constructor.

        Acceptance criteria

              gjoseph Magnolia International
              pbaerfuss Philipp Bärfuss
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Task DoD