-
Type: Clean up
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 5.6
-
Fix Version/s: 5.6.0-HF12, 5.7.1
-
Component/s: Core
When calling DocumentModel.getPropertyValue on missing complex list element, like files:files/0/filename when the files list is empty, the following stack trace is returned, without any indication of the property involved:
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:571) at java.util.ArrayList.get(ArrayList.java:349) at org.nuxeo.ecm.core.api.model.impl.ListProperty.get(ListProperty.java:125) at org.nuxeo.ecm.core.api.model.impl.AbstractProperty.resolvePath(AbstractProperty.java:435) at org.nuxeo.ecm.core.api.model.impl.AbstractProperty.resolvePath(AbstractProperty.java:394) at org.nuxeo.ecm.core.api.impl.DocumentModelImpl.getProperty(DocumentModelImpl.java:1378) at org.nuxeo.ecm.core.api.impl.DocumentModelImpl.getPropertyValue(DocumentModelImpl.java:1429)