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

ObservedComponentFactory.newInstance() should return a null-object when the observed path doesn't exist yet and a default implementation can not be determined

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Won't Do
    • Major
    • None
    • None
    • core
    • None

    Description

      Since MAGNOLIA-3011, ObservedComponentFactory.newInstance() can return a new instance of the request object even if the observed path does not exist yet, as long as it's a concrete class. If the object is requested by interface, we could return a null-object implementation of the interface. (Proxytoy's null object proxy) for example is such an implementation)

      There's a currently failing/commented out test, see: info.magnolia.objectfactory.ObservedComponentFactoryTest#testReturnsANullProxyUntilPathExistsForNonConcreteTypes

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                gjoseph Magnolia International
                gjoseph Magnolia International
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Task DoD