From 4d373e243426431097ffdbd3fec99aa174678fb6 Mon Sep 17 00:00:00 2001 From: "Piotr P. Karwasz" Date: Fri, 28 Aug 2026 09:08:08 +0200 Subject: [PATCH] Ignore the signature-polymorphic MethodHandle in Animal Sniffer 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 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 590ecf571..35c6c354e 100644 --- a/pom.xml +++ b/pom.xml @@ -1328,6 +1328,12 @@ ${animal-sniffer.signature} ${commons.animal-sniffer.signature.version} + + + java.lang.invoke.MethodHandle + diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 592aee142..6fd2e2177 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -59,6 +59,7 @@ The type attribute can be add,update,fix,remove. + 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. Bump org.cyclonedx:cyclonedx-maven-plugin from 2.9.2 to 2.9.3.