Skip to content

Commit 339cb23

Browse files
committed
Ignore the signature-polymorphic MethodHandle.invokeExact in animal-sniffer
javac records the ad-hoc call-site descriptor for invokeExact, which no signature database lists, so the JDK 8 check flags a false positive on every MethodHandle lookup call site. Assisted-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ErRKq7RUeQ9LGrSboSUyYm
1 parent 032c62f commit 339cb23

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

pom.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,18 @@ limitations under the License.
130130
</rulesets>
131131
</configuration>
132132
</plugin>
133+
<plugin>
134+
<groupId>org.codehaus.mojo</groupId>
135+
<artifactId>animal-sniffer-maven-plugin</artifactId>
136+
<configuration>
137+
<ignores>
138+
<!-- MethodHandle.invokeExact is signature-polymorphic: javac records the ad-hoc call-site descriptor, which no signature
139+
database lists, so the checker flags a false positive. The method itself exists on every supported runtime (Java 7+);
140+
absent *looked-up* methods are handled at runtime by findStatic returning null. -->
141+
<ignore>java.lang.invoke.MethodHandle</ignore>
142+
</ignores>
143+
</configuration>
144+
</plugin>
133145
</plugins>
134146
</pluginManagement>
135147
<plugins>

0 commit comments

Comments
 (0)