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

FactoryUtil$ObservedObjectFactory should gracefully handle components where a class is not specified

XMLWordPrintable

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

      If a property specifies, for example: info.magnolia.freemarker.FreemarkerTemplateLoaderManager=/server/freemarker and that this node exists but doesn't have a class property, FactoryUtil.getSingleton(FreemarkerTemplateLoaderManager.class) returns a java.util.Map instance.

      In such a case, it should return the correct type if possible (and it's possible in this case, because FreemarkerTemplateLoaderManager is a concrete class)

      If the node doesn't even exist, I am not sure what should be done.

      If the component would be an interface (as the property name), maybe we need a way to specify observer beans with BOTH a location and a default implementation ? Or use some sort of NullObject until the node exists, hoping the system is vaguely useable until the configuration is ok ? (Proxytoys's null or failover proxies might help)

        Acceptance criteria

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

                Created:
                Updated:
                Resolved:

                  Task DoD