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

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

      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

        Acceptance criteria

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

                Created:
                Updated:
                Resolved:

                  Task DoD