How does themeleaf determine that the array is empty?

<tr th:each="item:${list.rows}">
During the

loop, when the array passed by the background is empty, the display has no data for the time being, but how can it be judged to be empty?
here"s what I wrote: but the page reported an error

<tr th:each="item:${list.rows}" th:if="${list.rows.lenght>0}">
<tr style="text-align: center" th:unless="${list.rows.lenght==0}">
                <td colspan="5"></td>
            </tr>
Nov.14,2021

${- sharparrays.isEmpty (array)}

Resources: https://www.thymeleaf.org/doc.

Menu