[MGNLUI-3892] Updating sortable node children may throw ArrayIndexOutOfBoundsException Created: 25/May/16 Updated: 30/May/16 Resolved: 27/May/16 |
|
| Status: | Closed |
| Project: | Magnolia UI |
| Component/s: | vaadin integration |
| Affects Version/s: | None |
| Fix Version/s: | 5.4.7 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Federico Grilli | Assignee: | Federico Grilli |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 2.5h | ||
| 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)
|
||||||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||||||
| Sprint: | Basel 46 | ||||||||
| Story Points: | 1 | ||||||||
| Description |
|
When updating children of a sortable node with AbstractJcrNodeAdapter.updateChildren() code might end up to check for an array element at position -1 which would throw Caused by: java.lang.ArrayIndexOutOfBoundsException: -1 at java.util.ArrayList.elementData(ArrayList.java:400) at java.util.ArrayList.remove(ArrayList.java:477) at info.magnolia.ui.vaadin.integration.jcr.AbstractJcrNodeAdapter.sortChildren(AbstractJcrNodeAdapter.java:249) at info.magnolia.ui.vaadin.integration.jcr.AbstractJcrNodeAdapter.updateChildren(AbstractJcrNodeAdapter.java:215) at info.magnolia.security.app.dialog.action.SaveUserDialogAction.createOrUpdateUser(SaveUserDialogAction.java:183) at info.magnolia.security.app.dialog.action.SaveUserDialogAction.execute(SaveUserDialogAction.java:97) at info.magnolia.ui.api.action.AbstractActionExecutor.execute(AbstractActionExecutor.java:62) ... 123 more |