--
You received this message because you are subscribed to the Google Groups "PowerMock" group.
To view this discussion on the web visit https://groups.google.com/d/msg/powermock/-/6JfbY9q2tggJ.
To post to this group, send email to powe...@googlegroups.com.
To unsubscribe from this group, send email to powermock+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/powermock?hl=en.
Dito. We are also using mocktio & powermock and downloaded all latest versions of all jars. Cant find anything related to javaassist on their site.
As soon as we switch to java 7 we get that error and the tests fail.
Would appear to be a clear incompatibility problem with 7.
Any plans to test with Java 7?
We are using latest Junit and Powermock together IBM JDK 1.6 , 1.7 ... and we a running in the exact same problem.
Anyway, I found this google group posting ... and luckily I then checked the "issues" for powermock at google, leading to thisbug ticket:Long story short: there is a workaround (JVM command line switch) that prevents the exception:quoting"JVM flag -XX:-UseSplitVerifier to turn off the split verifier, which is what javassist is ultimately breaking.
http://stackoverflow.com/questions/7970622/java-7-jvm-verifyerror-in-eclipse"It seems like there is still a bug in the powermock code itself, but from reading the rest of the ticket I get the impressionthat it will not be fixed soon ...
--
You received this message because you are subscribed to the Google Groups "PowerMock" group.
To view this discussion on the web visit https://groups.google.com/d/msg/powermock/-/UluqE0wTO-IJ.
I wanted to warmup this rather old discussion on Java 7. I am experienced major problems as soon as compiling on JDK 7. These are so strong that I cannot use PowerMock on that platform actually.Some examples...* Weird messages when not using -XX:-UseSplitVerifier* @PrepareForTest -- With some classes hangs up totally (GC timeout after some minutes)* mockStatic -- Does something "strange" which leads to the fact that JaCoCo denies to touch the class anymoreIt would be great if one of the authors could give some insight when PowerMock can be used completely with JDK 7... :-)
--
You received this message because you are subscribed to the Google Groups "PowerMock" group.
To unsubscribe from this group and stop receiving emails from it, send an email to powermock+...@googlegroups.com.
Visit this group at http://groups.google.com/group/powermock?hl=en.For more options, visit https://groups.google.com/groups/opt_out.
Thank you for helping me. I digged into it a little deeper and discovered that the problem seems actually is not JDK 7 related -- I apparently just though so because when I added "-XX:-UseSplitVerifier" the most problems did not occur anymore. In fact, I actually had some stack traces with "Inconsistent stackmap frames" in the past, but I cannot reproduce those bugs currently, so I want to concentrate on those I can in the following:1. The "weird messages" is a stack trace complaining about "Inconsistent stackmap frames" for some PowerMock use cases, "java.lang.ArrayIndexOutOfBoundsException" at @PrepareForTest (even in an otherwise empty test class) for others, and a GC timeout when using mockStatic.
2. I can reproduce even in a minimal Maven setup, and it happens in Eclipse, too. If you want to can send you a minimal Maven project showcasing the problems.
3. See above. Just run "mvn test" and you'll get the exceptions and hangs.4. As I have to use @RunWith(Theories.class), I cannot use either, but I have to use the PowerMock @Rule.Today I concentrated on the ArrayIndexOutOfBoundsException showing up at @PrepareForTest. At least that one is not related to Java 7, even when it is gone as soon as using -XX:-UseSplitVerifier: It only occurs when JaCoCo is used together with PowerMock. I don't know why but if JaCoCo is removed, the problems are gone. I think the mockStatic is also not existing then. The problem is that the JaCoCo people say that this is a failure of PowerMock, it would "produce strange frames" whatever that means. So now I am sitting between two chairs: The PowerMock people and the JaCoCo people. :-(
One question. You said there is an agent-based rule. I cannot find info about that on http://code.google.com/p/powermock/wiki/PowerMockRule. How to enable that rule?What I just tried is using XStream vs. Objenenis and the result is that with XStream the ArrayOutOfBoundsException is gone.
--