[MAGNOLIA-2949] content2bean: make sure that the force creation flag is respected Created: 22/Nov/09  Updated: 18/Mar/10  Resolved: 18/Mar/10

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: 4.0.3, 4.1.1, 4.2
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Philipp Bärfuss Assignee: Philipp Bärfuss
Resolution: Obsolete Votes: 0
Labels: None
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: Not Specified Time Spent: Not Specified
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Attachments: Text File magnolia-core.patch    
Issue Links:
relation
is related to MAGNOLIA-2552 FactoryUtil: newInstance() method sho... Closed
Sub-Tasks:
Key
Summary
Type
Status
Assignee
MAGNOLIA-2951 content2bean: make sure that the forc... Sub-task Closed Boris Kraft  
MAGNOLIA-2956 content2bean: make sure that the forc... Sub-task Closed Jan Haderka  
Template:
Patch included:
Yes
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)
Testcase included:
Yes
Date of First Response:

 Description   

The FactoryUtil.newInstance() method throws exceptions since MAGNOLIA-2552 and does not return null anymore. To keep the same behavior in the content2bean processor if the force creation flag is set to true we have to catch the exceptions and react accordingly.

Otherwise the filter chain fails to instantiate if one of the classes is wrongly defined (even if it is somewhere deeper in the hierarchy). This is really dangerous.



 Comments   
Comment by Philipp Bärfuss [ 23/Nov/09 ]

Still have to backport and to do the same thing for setProperties, toMap, ...

Comment by Jan Haderka [ 25/Nov/09 ]

The subtasks dealing with most critical part of this issue have been resolved for 4.1.2 and 4.2.1. The rest of the work related to this issue will be handled in next 4.x version.

Comment by Philipp Bärfuss [ 14/Dec/09 ]

I attached the patch for this issue which can only be applied to a next major version as it adds a throws declaration.

Comment by Philipp Bärfuss [ 14/Dec/09 ]

Moved to 4.3 as it is not critical anymore since the MAGNOLIA-2951 has been fixed.

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