[MAGNOLIA-5291] The value of a class data node is not trimmed Created: 02/Sep/13 Updated: 20/Sep/13 Resolved: 04/Sep/13 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | content2bean |
| Affects Version/s: | 4.5.8 |
| Fix Version/s: | 4.5.12, 5.0.5, 5.1 |
| Type: | Improvement | Priority: | Neutral |
| Reporter: | Roman | Assignee: | Jaroslav Simak |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| 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)
|
| Date of First Response: | |
| Sprint: | 5.1 - RC1 |
| Description |
|
During setup of module configuration in admin central some values of class data nodes could be set with whitespaces in the end. These mistakes are not clear at once because everything looks good, even in logs. It will be better to have a trimmed value than ClassNotFoundException. |
| Comments |
| Comment by Jan Haderka [ 04/Sep/13 ] |
|
There was a check for blank value for a reason on the line next to the one you modified in n2bTransformerImpl. If property exists, but value was not set, getString() might return null in which case your .trim() call would end up with NPE ... better to use StringUtils.trim() for that. |