[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: |
|
||||||||||||||||||||||||||||
| 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. |