Re: [PR] Support Java 16 records in property lookup [veloc ity-engine]

Syed-SnapLogic (via GitHub) <[email protected]>
Newsgroups gmane.comp.jakarta.velocity.devel
Message-ID <PR_kwDOAN72MM5smNlV-6c7fd448-35de-4852-a664-8403ef3437d0@gitbox.apache.org>
Syed-SnapLogic commented on code in PR #45:
URL: https://github.com/apache/velocity-engine/pull/45#discussion_r2225867590


##########
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:
   @arkanovicz , this seems to have cause a breaking change in our application.  I am requesting @ravimergu1 to add more details here explaining the problem we are encountering.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.