Java 8: What is the equivalent of "UseSplitVerifier"?

Dave A picture Dave A · Jul 22, 2015 · Viewed 12.9k times · Source

I'm using Maven 3.2.3 on Mac 10.9.5 and have this for my compiler plugin ...

                                    <plugin>
                                            <groupId>org.apache.maven.plugins</groupId>
                                            <artifactId>maven-compiler-plugin</artifactId>
                                            <version>3.1</version>
                                            <configuration>
                                                    <source>1.8</source>
                                                    <target>1.8</target>
                                                    <compilerArgument>-proc:none</compilerArgument>
                                                    <fork>true</fork>
                                                    <!-- <compilerId>eclipse</compilerId>--> 
                                            </configuration>
                                            <executions>
                                                    <execution>
                                                            <id>default-testCompile</id>
                                                            <phase>test-compile</phase>
                                                            <goals>
                                                                    <goal>testCompile</goal>
                                                            </goals>
                                                    </execution>
                                            </executions>
                                    </plugin>

I have this for my surefire-plugin configuration ...

                    <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-surefire-plugin</artifactId>
                            <version>2.17</version>
                            <configuration>
                                    <reuseForks>true</reuseForks>
                                    <argLine>-Xmx2048m -XX:MaxPermSize=512M -XX:-UseSplitVerifier ${argLine}</argLine>
                                    <skipTests>${skipAllTests}</skipTests>
                            </configuration>
                    </plugin>

However, upon running "mvn clean install" I get this warning ...

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option UseSplitVerifier; support was removed in 8.0

What is the Java 8 equivalent of "UseSplitVerifier"?

Answer

Holger picture Holger · Jul 22, 2015

There is no equivalent. Note that the option in your configuration is -UseSplitVerifier (note the prepended minus) so the option says not to use the SplitVerifier but starting with Java 8, the SplitVerifier is mandatory.

The SplitVerifier was introduced with Java 6, being optional at that time and became the default with Java 7. But with Java 7, the option was still supported, so it could get turned off in case a bytecode processing tool was incompatible.

This was meant to provide a grace period in which these tools can get updated to be compatible with the related StackMapFrame bytecode attribute. That grace period is now over.

If the only thing you encounter is that warning, in other words, you experience no compatibility problems, you can just remove that option. Otherwise, you have to update the problematic tools/libraries.