Hello,
The current smart marker implementation struggles when processing nested arrays where one or more child arrays are empty.
PFA source code, template, and input.
Error details: Caused by: java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
Aspose Cells for Java: 25.5
14-may-2025.zip (9.0 KB)
Specifically, it throws an IndexOutOfBoundsException
when encountering an empty array within the nested structure. This occurs when attempting to iterate through the child array, even though it’s legitimate for a director to have no reporters (represented by an empty array).
Ideally, the engine should gracefully handle these empty arrays by simply skipping over them and continuing to process the remaining data in the parent iteration.
To improve the functionality and usability, providing a mechanism for the smart marker in the template to check for the presence of items within the target array or collection before processing would be beneficial.
This would allow users to implement conditional logic and avoid errors when dealing with potentially empty nested structures.