Skip to content

Commit

Permalink
Remove the animal sniffer plug-in
Browse files Browse the repository at this point in the history
Animal Sniffer inspects bytecode call-sites to look for calls to methods not defined by Java 8.
However, it doesn't know about signature polymorphic methods, like MethodHandle.invokeExact(), so we will always get warnings about those calls.

Since we can now natively build on Java 8 (this was previously not possible with Java 6), we can instead rely on the test suite to make sure we don't make calls to methods not available in Java 8.

The associated animal sniffer issue is mojohaus/animal-sniffer#67
  • Loading branch information
chrisvest committed May 3, 2024
1 parent fa54995 commit 29d03fb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 85 deletions.
43 changes: 0 additions & 43 deletions codec/src/test/resources/io/netty/handler/codec/xml/sample-04.xml
Original file line number Diff line number Diff line change
Expand Up @@ -287,49 +287,6 @@
<maxmem>1024m</maxmem>
</configuration>
</plugin>
<plugin>
<!-- ensure that only methods available in java 1.6 can
be used even when compiling with java 1.7+ -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<version>1.15</version>
<configuration>
<signature>
<groupId>org.codehaus.mojo.signature</groupId>
<artifactId>java16</artifactId>
<version>1.1</version>
</signature>
<ignores>
<ignore>sun.misc.Unsafe</ignore>
<ignore>sun.misc.Cleaner</ignore>

<ignore>java.util.zip.Deflater</ignore>

<!-- Used for NIO UDP multicast -->
<ignore>java.nio.channels.DatagramChannel</ignore>
<ignore>java.nio.channels.MembershipKey</ignore>
<ignore>java.net.StandardProtocolFamily</ignore>

<!-- Used for NIO. 2 -->
<ignore>java.nio.channels.AsynchronousChannel</ignore>
<ignore>java.nio.channels.AsynchronousSocketChannel</ignore>
<ignore>java.nio.channels.AsynchronousServerSocketChannel</ignore>
<ignore>java.nio.channels.AsynchronousChannelGroup</ignore>
<ignore>java.nio.channels.NetworkChannel</ignore>
<ignore>java.nio.channels.InterruptedByTimeoutException</ignore>
<ignore>java.net.StandardSocketOptions</ignore>
<ignore>java.net.SocketOption</ignore>
</ignores>
</configuration>
<executions>
<execution>
<phase>process-classes</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.12.1</version>
Expand Down
42 changes: 0 additions & 42 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@
<!-- pax-exam does not work on latest Java12 EA 22 build -->
<skipOsgiTestsuite>true</skipOsgiTestsuite>
<revapi.skip>true</revapi.skip>
<animal.sniffer.skip>true</animal.sniffer.skip>
</properties>
</profile>
<profile>
Expand All @@ -226,7 +225,6 @@
<!-- pax-exam does not work on latest Java12 EA 22 build -->
<skipOsgiTestsuite>true</skipOsgiTestsuite>
<revapi.skip>true</revapi.skip>
<animal.sniffer.skip>true</animal.sniffer.skip>
</properties>
</profile>
<profile>
Expand All @@ -247,7 +245,6 @@
<!-- pax-exam does not work on latest Java12 EA 22 build -->
<skipOsgiTestsuite>true</skipOsgiTestsuite>
<revapi.skip>true</revapi.skip>
<animal.sniffer.skip>true</animal.sniffer.skip>
</properties>
</profile>
<profile>
Expand All @@ -268,7 +265,6 @@
<!-- pax-exam does not work on latest Java12 EA 22 build -->
<skipOsgiTestsuite>true</skipOsgiTestsuite>
<revapi.skip>true</revapi.skip>
<animal.sniffer.skip>true</animal.sniffer.skip>
</properties>
</profile>
<profile>
Expand All @@ -289,7 +285,6 @@
<!-- pax-exam does not work on latest Java12 EA 22 build -->
<skipOsgiTestsuite>true</skipOsgiTestsuite>
<revapi.skip>true</revapi.skip>
<animal.sniffer.skip>true</animal.sniffer.skip>
</properties>
</profile>
<profile>
Expand All @@ -309,7 +304,6 @@

<!-- pax-exam does not work on latest Java12 EA 22 build -->
<skipOsgiTestsuite>true</skipOsgiTestsuite>
<animal.sniffer.skip>true</animal.sniffer.skip>
</properties>
</profile>

Expand All @@ -330,7 +324,6 @@
<jboss.marshalling.version>2.0.5.Final</jboss.marshalling.version>
<!-- pax-exam does not work on latest Java12 EA 22 build -->
<skipOsgiTestsuite>true</skipOsgiTestsuite>
<animal.sniffer.skip>true</animal.sniffer.skip>
</properties>
</profile>

Expand All @@ -351,7 +344,6 @@
<jboss.marshalling.version>2.0.5.Final</jboss.marshalling.version>
<!-- pax-exam does not work on latest Java12 EA 22 build -->
<skipOsgiTestsuite>true</skipOsgiTestsuite>
<animal.sniffer.skip>true</animal.sniffer.skip>
</properties>
</profile>
<!-- JDK14 -->
Expand All @@ -371,7 +363,6 @@
<jboss.marshalling.version>2.0.5.Final</jboss.marshalling.version>
<!-- pax-exam does not work on latest Java12 EA 22 build -->
<skipOsgiTestsuite>true</skipOsgiTestsuite>
<animal.sniffer.skip>true</animal.sniffer.skip>
</properties>
</profile>
<!-- JDK13 -->
Expand All @@ -391,7 +382,6 @@
<jboss.marshalling.version>2.0.5.Final</jboss.marshalling.version>
<!-- pax-exam does not work on latest Java12 EA 22 build -->
<skipOsgiTestsuite>true</skipOsgiTestsuite>
<animal.sniffer.skip>true</animal.sniffer.skip>
</properties>
</profile>

Expand All @@ -412,7 +402,6 @@
<jboss.marshalling.version>2.0.5.Final</jboss.marshalling.version>
<!-- pax-exam does not work on latest Java12 EA 22 build -->
<skipOsgiTestsuite>true</skipOsgiTestsuite>
<animal.sniffer.skip>true</animal.sniffer.skip>
</properties>
</profile>

Expand All @@ -433,7 +422,6 @@
<jboss.marshalling.version>2.0.5.Final</jboss.marshalling.version>
<!-- pax-exam does not work on latest Java11 build -->
<skipOsgiTestsuite>true</skipOsgiTestsuite>
<animal.sniffer.skip>true</animal.sniffer.skip>
</properties>
</profile>

Expand All @@ -454,7 +442,6 @@
<enforcer.plugin.version>3.0.0-M3</enforcer.plugin.version>
<!-- 1.4.x does not work in Java10+ -->
<jboss.marshalling.version>2.0.5.Final</jboss.marshalling.version>
<animal.sniffer.skip>true</animal.sniffer.skip>
</properties>
</profile>

Expand All @@ -471,7 +458,6 @@
<forbiddenapis.skip>true</forbiddenapis.skip>
<!-- Needed because of https://issues.apache.org/jira/browse/MENFORCER-275 -->
<enforcer.plugin.version>3.0.0-M1</enforcer.plugin.version>
<animal.sniffer.skip>true</animal.sniffer.skip>
</properties>
<activation>
<jdk>9</jdk>
Expand Down Expand Up @@ -1911,34 +1897,6 @@
</excludes>
</configuration>
</plugin>
<plugin>
<!-- ensure that only methods available in java 1.8 can
be used even when compiling with java 9+ -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<version>1.23</version>
<configuration>
<signature>
<groupId>org.codehaus.mojo.signature</groupId>
<artifactId>java18</artifactId>
<version>1.0</version>
</signature>
<ignores>
<ignore>java.nio.ByteBuffer</ignore>
</ignores>
<annotations>
<annotation>io.netty.util.internal.SuppressJava8Requirement</annotation>
</annotations>
</configuration>
<executions>
<execution>
<phase>process-classes</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.1.0</version>
Expand Down

0 comments on commit 29d03fb

Please sign in to comment.