This is an automated email from the ASF dual-hosted git repository.

henrib pushed a commit to branch JEXL-472
in repository https://gitbox.apache.org/repos/asf/commons-jexl.git


The following commit(s) were added to refs/heads/JEXL-472 by this push:
     new 390d2043 JEXL-472: Consolidate record reflection into ClassTool, fix 
test fixture
390d2043 is described below

commit 390d204331f86b5515b868a77198ef73dc345a42
Author: Henrib <[email protected]>
AuthorDate: Mon Sep 14 14:47:43 2026 +0200

    JEXL-472: Consolidate record reflection into ClassTool, fix test fixture
    
    - Builds on the record accessor support originally proposed by
    Aurelien Mino in #415.
    
    - Move the Class#isRecord()/getRecordComponents() reflection out of
    RecordGetExecutor and into the existing ClassTool backport utility,
    resolved via MethodHandle to match how it already backports Java 9+
    module reflection, instead of duplicating a separate Method-based
    lookup.
    
    - Fix RecordPropertyAccessTest's on-the-fly compiled record fixture to
    actually compile into org.apache.commons.jexl3. Also switch the test to 
extend JexlTestCase and use the shared restricted-permissions engine instead of 
a bespoke
    UNRESTRICTED-permissions one, matching the rest of the suite.
    
    - Correct @since on the namespaceInstantiation additions (JexlFeatures,    
JexlOptions) from stale 3.6 to 3.7.1, and RecordGetExecutor from 3.7.2 to 
3.7.1, matching the actual in-flight version.
    - Reorder actions within each changes.xml section by descending JEXL issue 
number.
---
 .gitignore                                                       | 4 ++++
 pom.xml                                                          | 4 ++--
 src/changes/changes.xml                                          | 9 +++++----
 src/main/java/org/apache/commons/jexl3/JexlFeatures.java         | 4 ++--
 src/main/java/org/apache/commons/jexl3/JexlOptions.java          | 4 ++--
 .../commons/jexl3/internal/introspection/RecordGetExecutor.java  | 2 +-
 6 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/.gitignore b/.gitignore
index c011a020..6752f3ab 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,3 +12,7 @@ target/
 nb-configuration.xml
 nbactions.xml
 /CLAUDE.md
+
+# local convenience scratch files, not part of the test suite
+/src/test/java/org/apache/commons/jexl3/CursorTest.java
+/src/test/java/org/apache/commons/jexl3/SmoothSort.java
diff --git a/pom.xml b/pom.xml
index 04aaa1fc..0f26a26b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -228,7 +228,7 @@
                 <configuration>
                     
<configLocation>${basedir}/src/main/config/checkstyle.xml</configLocation>
                     
<suppressionsLocation>${basedir}/src/main/config/checkstyle-suppressions.xml</suppressionsLocation>
-                    <excludes>org/apache/commons/jexl3/parser/*.java</excludes>
+                    
<excludes>org/apache/commons/jexl3/parser/*.java,org/apache/commons/jexl3/CursorTest.java,org/apache/commons/jexl3/SmoothSort.java</excludes>
                     
<headerLocation>${basedir}/src/main/config/header.txt</headerLocation>
                     <enableRulesSummary>true</enableRulesSummary>
                     
<includeTestSourceDirectory>true</includeTestSourceDirectory>
@@ -338,7 +338,7 @@
                 <configuration>
                     
<configLocation>${basedir}/src/main/config/checkstyle.xml</configLocation>
                     
<suppressionsLocation>${basedir}/src/main/config/checkstyle-suppressions.xml</suppressionsLocation>
-                    <excludes>org/apache/commons/jexl3/parser/*.java</excludes>
+                    
<excludes>org/apache/commons/jexl3/parser/*.java,org/apache/commons/jexl3/CursorTest.java,org/apache/commons/jexl3/SmoothSort.java</excludes>
                     
<headerLocation>${basedir}/src/main/config/header.txt</headerLocation>
                     <enableRulesSummary>false</enableRulesSummary>
                     <!-- Needed to define config_loc for use by Eclipse -->
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 51b05a8c..612eb930 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -29,16 +29,17 @@
     <body>
         <release version="3.7.1" date="YYYY-MM-DD" description="This is a 
feature and maintenance release. Java 8 or later is required.">
             <!-- ADD -->
-            <action dev="henrib" type="add" issue="JEXL-467">IntelliJ and 
VSCode editors (TextMate bundle) support for JEXL.</action>
+            <action dev="henrib" due-to="Aurelien Mino" type="add" 
issue="JEXL-472">Add property access support for Java record component 
accessors.</action>
             <action dev="henrib" due-to="Claude" type="add" 
issue="JEXL-469">Add JexlFeatures.namespaceInstantiation(boolean) to control 
whether a namespace bound to a Class or class-name string is reflectively 
auto-instantiated into a functor; string namespaces now resolve through the 
permission-aware uberspect.</action>
+            <action dev="henrib" type="add" issue="JEXL-467">IntelliJ and 
VSCode editors (TextMate bundle) support for JEXL.</action>
             <!-- FIX -->
+            <action dev="henrib" due-to="Claude" type="fix" 
issue="JEXL-471">Runtime hardening: make regex matching (=~ operator) 
interruptible, enforce MathContext precision on BigInteger arithmetic results, 
and prevent O(n²) DoS from huge BigInteger literals at parse time.</action>
+            <action dev="henrib" due-to="Claude" type="fix" 
issue="JEXL-470">Fix several parser and interpreter correctness issues: Unicode 
escape hex-digit validation, safe-navigation array-access child indexing, regex 
escape preservation, empty()/size() error and cancellation propagation, and 
switch+continue semantics.</action>
+            <action dev="henrib" due-to="Claude" type="fix" 
issue="JEXL-468">Improve robustness of introspection permissions and sandbox 
delegation: close nested-class and interface-method denial gaps, fix 
class-initialization ordering, gate sandbox iteration, fix permission-parser 
polarity, deny second-stage compiler surface under RESTRICTED, and enforce 
parser feature restrictions in sub-parsers.</action>
             <action dev="henrib" type="fix" 
issue="JEXL-466">IllegalStateException parsing a template with string 
interpolation.</action>
             <action dev="NikRom5531" due-to="Felix Rudolphi" type="fix" 
issue="JEXL-411">Leading zeroes in floating point numbers should be 
optional.</action>
             <action dev="ggregory" type="fix" due-to="Gary Gregory">Pick up 
commons.jacoco.version from the parent POM.</action>
             <action dev="ggregory" type="fix" due-to="Gary Gregory">Add 
messages when throwing NullPointerException.</action>
-            <action dev="henrib" due-to="Claude" type="fix" 
issue="JEXL-468">Improve robustness of introspection permissions and sandbox 
delegation: close nested-class and interface-method denial gaps, fix 
class-initialization ordering, gate sandbox iteration, fix permission-parser 
polarity, deny second-stage compiler surface under RESTRICTED, and enforce 
parser feature restrictions in sub-parsers.</action>
-            <action dev="henrib" due-to="Claude" type="fix" 
issue="JEXL-470">Fix several parser and interpreter correctness issues: Unicode 
escape hex-digit validation, safe-navigation array-access child indexing, regex 
escape preservation, empty()/size() error and cancellation propagation, and 
switch+continue semantics.</action>
-            <action dev="henrib" due-to="Claude" type="fix" 
issue="JEXL-471">Runtime hardening: make regex matching (=~ operator) 
interruptible, enforce MathContext precision on BigInteger arithmetic results, 
and prevent O(n²) DoS from huge BigInteger literals at parse time.</action>
             <!-- UPDATE -->
             <action type="update" dev="ggregory" due-to="Gary Gregory">Bump 
org.apache.commons:commons-parent from 102 to 105.</action>
         </release>
diff --git a/src/main/java/org/apache/commons/jexl3/JexlFeatures.java 
b/src/main/java/org/apache/commons/jexl3/JexlFeatures.java
index a68d2490..f7802a06 100644
--- a/src/main/java/org/apache/commons/jexl3/JexlFeatures.java
+++ b/src/main/java/org/apache/commons/jexl3/JexlFeatures.java
@@ -445,7 +445,7 @@ public final class JexlFeatures {
      *
      * @param flag true to enable, false to disable
      * @return this features instance
-     * @since 3.6
+     * @since 3.7.1
      */
     public JexlFeatures namespaceInstantiation(final boolean flag) {
         setFeature(NAMESPACE_INSTANTIATE, flag);
@@ -966,7 +966,7 @@ public final class JexlFeatures {
      * from a class or class-name binding?
      *
      * @return true if namespace auto-instantiation is allowed, false otherwise
-     * @since 3.6
+     * @since 3.7.1
      */
     public boolean supportsNamespaceInstantiation() {
         return getFeature(NAMESPACE_INSTANTIATE);
diff --git a/src/main/java/org/apache/commons/jexl3/JexlOptions.java 
b/src/main/java/org/apache/commons/jexl3/JexlOptions.java
index 83c717e1..908adc32 100644
--- a/src/main/java/org/apache/commons/jexl3/JexlOptions.java
+++ b/src/main/java/org/apache/commons/jexl3/JexlOptions.java
@@ -286,7 +286,7 @@ public final class JexlOptions {
      * binding allowed?
      *
      * @return true if namespace auto-instantiation is allowed, false otherwise
-     * @since 3.6
+     * @since 3.7.1
      */
     public boolean isNamespaceInstantiation() {
         return isSet(NAMESPACE_INSTANTIATE, flags);
@@ -453,7 +453,7 @@ public final class JexlOptions {
      * auto-instantiated into a functor.
      *
      * @param flag true to enable, false to disable
-     * @since 3.6
+     * @since 3.7.1
      */
     public void setNamespaceInstantiation(final boolean flag) {
         flags = set(NAMESPACE_INSTANTIATE, flags, flag);
diff --git 
a/src/main/java/org/apache/commons/jexl3/internal/introspection/RecordGetExecutor.java
 
b/src/main/java/org/apache/commons/jexl3/internal/introspection/RecordGetExecutor.java
index 88a207fc..508b9395 100644
--- 
a/src/main/java/org/apache/commons/jexl3/internal/introspection/RecordGetExecutor.java
+++ 
b/src/main/java/org/apache/commons/jexl3/internal/introspection/RecordGetExecutor.java
@@ -30,7 +30,7 @@ import org.apache.commons.jexl3.JexlException;
  * targets; on such a runtime, {@code Class#isRecord()} and {@code 
Class#getRecordComponents()} simply
  * do not exist and discovery quietly reports no match instead of failing to 
link.</p>
  *
- * @since 3.7.2
+ * @since 3.7.1
  */
 public final class RecordGetExecutor extends AbstractExecutor.Get {
 

Reply via email to