[MAGNOLIA-2361] Content2bean: get a more explicit message when class property exists but is empty Created: 11/Sep/08 Updated: 23/Jan/13 Resolved: 12/Sep/08 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | core |
| Affects Version/s: | None |
| Fix Version/s: | 3.6.2, 3.6.3 |
| Type: | Bug | Priority: | Major |
| Reporter: | Magnolia International | Assignee: | Magnolia International |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | content2bean | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| 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)
|
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
| Date of First Response: |
| Description |
|
original title: fallback to default implementation when class property is empty or wrongly set ? To be discussed: as per |
| Comments |
| Comment by Philipp Bracher [ 12/Sep/08 ] |
|
I am against it because it is very risky. In cases this behavior is explicitly wished it might be done in a custom transformer (by catching the class not found exception). |
| Comment by Philipp Bracher [ 12/Sep/08 ] |
|
So resolve the issue (reopen it in case you don't agree) |
| Comment by Philipp Bracher [ 12/Sep/08 ] |
|
If no class is defined c2b uses the magnolia properties to resolve the default implementation class. |
| Comment by Magnolia International [ 12/Sep/08 ] |
|
My main concern was actually for when the class property exists but does not have any value; I just realized that in fact the error log was still pretty clear in this case: WARN info.magnolia.content2bean[...] can't resolve class for node /modules/adminInterface/virtualURIMapping/default java.lang.ClassNotFoundException: at java.lang.Class.forName0(Native Method) [...] However I've just added a little check that will behave exactly the same way if the class property is empty, but with a more explicit message in the ClassNotFoundException than an empty string. |
| Comment by Magnolia International [ 12/Sep/08 ] |
|
fixed in trunk |