[LRA-147] [Crafter Integration Portlet]VM code needs to be updated to prevent potentiall null pointer exception or index out of bound exception Created: 23/Apr/14 Updated: 25/Apr/14 Resolved: 25/Apr/14 |
|
| Status: | Resolved |
| Project: | Liferay Apps |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major |
| Reporter: | Dong-Jun Kim [X] (Inactive) | Assignee: | mcalvo |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
VM codes in Crafter Integration portlet velocity-templates-theme need update to prevent potential null pointer exception or index out of bound exception. The following code is the problem from "office_locations_template.vm" and "single_content_template.vm".
#set ($content = $documentsMap.get(0)) When the documentMap object doesn't include any entry, the code will end up with index out of bound exception. We need to check if the map contains any element first and then need to try to access the first element. Thanks, |
| Comments |
| Comment by Dong-Jun Kim [X] (Inactive) [ 25/Apr/14 ] |
|
Resolved and the updates have been merged to GitHub repo.
Thanks, |