-
Type:
Improvement
-
Status: Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Component/s: None
-
Labels:None
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,
#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,