[MAGNOLIA-2533] FactoryUtil$ObservedObjectFactory should gracefully handle components where a class is not specified Created: 02/Jan/09  Updated: 23/Jan/13  Resolved: 12/Mar/10

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: None
Fix Version/s: 4.3

Type: Improvement Priority: Major
Reporter: Magnolia International Assignee: Magnolia International
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
dependency
is depended upon by MAGNOLIA-3080 Cleanup conundrum between FreemarkerH... Closed
is depended upon by MAGNOLIA-1469 Make Freemarker more configurable thr... Closed
duplicate
duplicates MAGNOLIA-3011 ObservedComponentFactory.newInstance(... Closed
relation
is related to MAGNOLIA-2553 FactoryUtil: should return a proxy ob... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)

 Description   

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)



 Comments   
Comment by Magnolia International [ 14/Jan/10 ]

Is this still the case ?

Comment by Magnolia International [ 12/Mar/10 ]

Done for concrete classes.
For interfaces, see MAGNOLIA-3125.

Generated at Mon Feb 12 03:37:38 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.