dlsgusrn7577 / mockito

Automatically exported from code.google.com/p/mockito
0 stars 0 forks source link

PowermockitoRunner failes with Java 7u65 and Java 8u11 #498

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Everytime I want to run tests with the PowermockitoRunner it failes with the 
following message:

testDownloadDataIoException(de.xplace.pos.app.javafx2.util.downloader.CacheFileH
elperDownloadDataTest)  Time elapsed: 0.173 sec  <<< ERROR!
java.lang.VerifyError: Bad <init> method call from inside of a branch
Exception Details:
  Location:
    de/xplace/pos/app/javafx2/util/downloader/CacheFileHelper.<init>()V @44: invokespecial
  Reason:
    Error exists in the bytecode
  Bytecode:
    0000000: 2a01 014e 4d4c 1300 0eb8 0014 05bd 0004
    0000010: 5903 2c53 5904 2d53 1300 16b8 001a b800
    0000020: 203a 0519 05b2 0024 a500 0a2a b700 26a7
    0000030: 000b 2b2c 2db7 0028 0157 b1            
  Stackmap Table:
    full_frame(@50,{UninitializedThis,UninitializedThis,Null,Null,Top,Object[#4]},{})
    full_frame(@58,{Object[#2],Object[#2],Null,Null,Top,Object[#4]},{})

    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:190)
    at javassist.runtime.Desc.getClassObject(Desc.java:43)
    at javassist.runtime.Desc.getClassType(Desc.java:152)
    at javassist.runtime.Desc.getType(Desc.java:122)
    at javassist.runtime.Desc.getType(Desc.java:78)

this problem occures only in the combination Java 7u65 or Java 8u11 and the 
annotation @RunWith (PowerMockRunner.class)
MockitoJUnitRunner works as aspected

I think the internal Java API of the last release was changed.

Greetings,
Alex

Original issue reported on code.google.com by redmann....@gmail.com on 21 Jul 2014 at 11:31

GoogleCodeExporter commented 8 years ago
It looks like more a PowerMock issue, which nota bene was already reported as 
https://code.google.com/p/powermock/issues/detail?id=505

Original comment by msz...@wp.pl on 21 Jul 2014 at 12:20

GoogleCodeExporter commented 8 years ago
The stack is not the same, but those two issues looks similar each other.

Original comment by msz...@wp.pl on 21 Jul 2014 at 12:21

GoogleCodeExporter commented 8 years ago
Mockito don't use javassist. Most probably an issue with Powermock

Original comment by brice.du...@gmail.com on 24 Jul 2014 at 6:08