ravimergu1 commented on code in PR #45:
URL: https://github.com/apache/velocity-engine/pull/45#discussion_r2226376668


##########
velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/PropertyExecutor.java:
##########
@@ -119,6 +119,16 @@ protected void discover(final Class<?> clazz, final String 
property)
 
                 setMethod(introspector.getMethod(clazz, sb.toString(), 
params));
             }
+
+            if (!isAlive())
+            {
+                /*
+                 * If no JavaBean property was found, try the convention used 
by Java 16 records.
+                 * No convenience case flip because the more convenient 
lowerCamelCase is also the
+                 * more likely to be used in the record itself.
+                 */
+                setMethod(introspector.getMethod(clazz, property, params));
+            }

Review Comment:
   This issue is similar to 
[VELOCITY-986](https://issues.apache.org/jira/browse/VELOCITY-986). In this 
case, we are calling the values method on a map object. The values method 
returns a collection, and within that collection, there is a single element 
which is an array. This is why we are seeing a nested array (an array within an 
array) in the output.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org

Reply via email to