Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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"?

like image 347
Dave A Avatar asked Jul 22 '15 14:07

Dave A


2 Answers

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.

like image 188
Holger Avatar answered Sep 20 '22 00:09

Holger


You should stop using -XX:-UseSplitVerifier. Anyway, it's not supported by Java 8. And upgrade your maven-compiler-plugin to 3.2 . That will resolve your problems with bytecode verfication.

like image 41
ABDAOUI Wahbi Avatar answered Sep 21 '22 00:09

ABDAOUI Wahbi