Java 21 introduced a getLast method. This breaks templates that use the {{@last}} directive on an empty list.
Using handlebars with Java < 21 the @last directive was resolved via the extendedContext in Context.java:583. Unfortunately with the JavaBeanResolver the getLast method matches the @last 'methodName' without the get prefix.
When an empty list is used getLast throws an NoSuchElement exception which is not handled correctly and leads to an error when evaluating the @last directive.