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

garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-parent.git


The following commit(s) were added to refs/heads/master by this push:
     new 20098cc  Ignore the signature-polymorphic MethodHandle in Animal 
Sniffer (#719)
20098cc is described below

commit 20098ccecc66258955babfcf5c2fe5e8c219951e
Author: Piotr P. Karwasz <[email protected]>
AuthorDate: Sat Aug 29 12:43:23 2026 +0200

    Ignore the signature-polymorphic MethodHandle in Animal Sniffer (#719)
    
    javac records the ad-hoc call-site descriptor for MethodHandle's
    invokers (invokeExact, invoke), which no signature database lists, so
    the Animal Sniffer check on JDK 8 flags every such call site as an
    undefined reference even though the invokers exist on all supported
    targets (Java 7+).
    
    Assisted-By: Claude Fable 5 <[email protected]>
    Claude-Session: https://claude.ai/code/session_01ErRKq7RUeQ9LGrSboSUyYm
---
 pom.xml                 | 6 ++++++
 src/changes/changes.xml | 1 +
 2 files changed, 7 insertions(+)

diff --git a/pom.xml b/pom.xml
index 590ecf5..35c6c35 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1328,6 +1328,12 @@
                 <artifactId>${animal-sniffer.signature}</artifactId>
                 <version>${commons.animal-sniffer.signature.version}</version>
               </signature>
+              <ignores>
+                <!-- MethodHandle's invokers are signature-polymorphic: javac 
records the ad-hoc call-site descriptor,
+                     which no signature database lists, so every 
invokeExact/invoke call site would be flagged as an
+                     undefined reference. The class and its invokers exist on 
all supported targets (Java 7+). -->
+                <ignore>java.lang.invoke.MethodHandle</ignore>
+              </ignores>
             </configuration>
           </plugin>
 
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 592aee1..6fd2e21 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -59,6 +59,7 @@ The <action> type attribute can be add,update,fix,remove.
     <body>
       <release version="105" date="YYYY-MM-DD" description="This is a feature 
and maintenance release. Java 8 or later is required.">
         <!-- FIX -->
+        <action type="fix" dev="pkarwasz" due-to="Piotr P. Karwasz">Ignore 
references to the signature-polymorphic java.lang.invoke.MethodHandle in the 
Animal Sniffer check: javac records ad-hoc call-site descriptors that no 
signature database lists.</action>
         <!-- ADD -->
         <!-- UPDATE -->
         <action type="update" dev="ggregory" due-to="Gary Gregory">Bump 
org.cyclonedx:cyclonedx-maven-plugin from 2.9.2 to 2.9.3.</action>

Reply via email to