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

                 Key: MAGNOLIA-2533
                 URL: http://jira.magnolia-cms.com/browse/MAGNOLIA-2533
             Project: Magnolia
          Issue Type: Improvement
          Components: core
            Reporter: Gregory Joseph
            Assignee: Philipp Bracher
             Fix For: 4.0


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 ?



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.magnolia-cms.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to