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

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

    XMLWordPrintable

Details

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

    Description

      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.

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Task DoD