Skip to content

Commit b36f080

Browse files
committed
Describe at the README the issue with the java.lang.VerifyError
1 parent 71773c8 commit b36f080

2 files changed

Lines changed: 33 additions & 0 deletions

File tree

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,6 @@ Known issues while testing:
3737
* [ECLEmma coverage plugin incompatible with PowerMock](http://stackoverflow.com/questions/23363212/powermock-eclemma-coverage-issue)
3838

3939
* When using @PrepareForTest and PowerMockito the breakpoints not does [not stop when debugging](http://stackoverflow.com/questions/35140575/powermockito-junit-and-eclemma-debugging-dosent-work). The solution is define Rules.
40+
41+
* Java7+ enforces bytecode verification and with Powermock you can experience a [java.lang.VerifyError](http://www.notonlyanecmplace.com/java-7-enforces-bytecode-verification/).
42+
At Java8 bytecode verification is mandatory and there is no option to disable it :(

core/pom.xml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@
3434
<version>1.6.2</version>
3535
<scope>test</scope>
3636
</dependency>
37+
<dependency>
38+
<groupId>org.powermock</groupId>
39+
<artifactId>powermock-module-javaagent</artifactId>
40+
<version>1.6.0</version>
41+
<scope>test</scope>
42+
</dependency>
3743
<dependency>
3844
<groupId>org.powermock</groupId>
3945
<artifactId>powermock-module-junit4-rule-agent</artifactId>
@@ -83,6 +89,30 @@
8389
<build>
8490
<finalName>java-saml-toolkit</finalName>
8591
<plugins>
92+
<plugin>
93+
<groupId>org.jacoco</groupId>
94+
<artifactId>jacoco-maven-plugin</artifactId>
95+
<version>0.7.6.201602180812</version>
96+
<configuration>
97+
<propertyName>jacoco.agent.argLine</propertyName>
98+
</configuration>
99+
<executions>
100+
<execution>
101+
<id>prepare-agent</id>
102+
<goals>
103+
<goal>prepare-agent</goal>
104+
</goals>
105+
</execution>
106+
</executions>
107+
</plugin>
108+
<plugin>
109+
<groupId>org.apache.maven.plugins</groupId>
110+
<artifactId>maven-surefire-plugin</artifactId>
111+
<version>2.12</version>
112+
<configuration>
113+
<argLine>-XX:-UseSplitVerifier ${jacoco.agent.argLine}</argLine>
114+
</configuration>
115+
</plugin>
86116
<plugin>
87117
<groupId>org.apache.maven.plugins</groupId>
88118
<artifactId>maven-compiler-plugin</artifactId>

0 commit comments

Comments
 (0)