[MAGNOLIA-3761] Wrong condition tested for the save label in Dialog class Created: 18/Jul/11 Updated: 16/Aug/11 Resolved: 21/Jul/11 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | admininterface |
| Affects Version/s: | 4.4.4 |
| Fix Version/s: | 4.4.5 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Danilo Ghirardelli | Assignee: | Daniel Lipp |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| 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)
|
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
| Date of First Response: |
| Description |
|
I stumbled upon this while doing some extension for a project. String saveLabel = this.getConfigValue("saveLabel", msgs.get("buttons.save")); if (StringUtils.isNotEmpty(saveOnclick) && StringUtils.isNotEmpty("saveLabel")) { Seems alright, but in the second isNotEmpty, the string tested is not saveLabel as a variable, but as the string itself. Obviously that condition will always be true, leading potential problems to the following code. |
| Comments |
| Comment by Jan Haderka [ 19/Jul/11 ] |
|
Thanks for patch. |