Stefan Hendriks created JASSIST-220:
---------------------------------------
Summary: Java 8 & Streams/Consumers -
javassist.bytecode.InterfaceMethodrefInfo cannot be cast to
javassist.bytecode.MethodrefInfo
Key: JASSIST-220
URL:
https://issues.jboss.org/browse/JASSIST-220
Project: Javassist
Issue Type: Bug
Affects Versions: 3.18.1-GA
Environment: OS X
Reporter: Stefan Hendriks
Assignee: Shigeru Chiba
This is a bug report - which also exists on the powermock issue tracker at
https://code.google.com/p/powermock/issues/detail?id=490
---
The problem is that an exception is thrown (see below how to reproduce)
Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/bin/java -ea
-Didea.launcher.port=7543 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA
13.app/bin" -Dfile.encoding=UTF-8 -classpath "/Applications/IntelliJ IDEA
13.app/lib/idea_rt.jar:/Applications/IntelliJ IDEA
13.app/plugins/junit/lib/junit-rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/lib/ant-javafx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/lib/javafx-mx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/lib/tools.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/htmlconverter.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/javaws.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/jfxswt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/management-agent.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/plugin.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/ext/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/ext/nashorn.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/Users/shendriks/projects/katas/fizzbuzz/java/target/test-classes:/Users/shendriks/projects/katas/fizzbuzz/java/target/classes:/Users/shendriks/.m2/repository/junit/junit/4.8.2/junit-4.8.2.jar:/Users/shendriks/.m2/repository/org/hamcrest/hamcrest-all/1.3/hamcrest-all-1.3.jar:/Users/shendriks/.m2/repository/org/mockito/mockito-all/1.9.5/mockito-all-1.9.5.jar:/Users/shendriks/.m2/repository/org/powermock/powermock-module-junit4/1.5.4/powermock-module-junit4-1.5.4.jar:/Users/shendriks/.m2/repository/org/powermock/powermock-module-junit4-common/1.5.4/powermock-module-junit4-common-1.5.4.jar:/Users/shendriks/.m2/repository/org/powermock/powermock-core/1.5.4/powermock-core-1.5.4.jar:/Users/shendriks/.m2/repository/org/powermock/powermock-reflect/1.5.4/powermock-reflect-1.5.4.jar:/Users/shendriks/.m2/repository/org/objenesis/objenesis/2.1/objenesis-2.1.jar:/Users/shendriks/.m2/repository/org/javassist/javassist/3.18.1-GA/javassist-3.18.1-GA.jar:/Users/shendriks/.m2/repository/org/powermock/powermock-api-mockito/1.5.4/powermock-api-mockito-1.5.4.jar:/Users/shendriks/.m2/repository/org/powermock/powermock-api-support/1.5.4/powermock-api-support-1.5.4.jar"
com.intellij.rt.execution.application.AppMain com.intellij.rt.execution.junit.JUnitStarter
-ideVersion5 com.fundynamic.katas.FizzBuzzTest
Internal Error occured.
java.lang.IllegalStateException: Failed to transform class with name
com.fundynamic.katas.FizzBuzz. Reason: javassist.bytecode.InterfaceMethodrefInfo cannot be
cast to javassist.bytecode.MethodrefInfo
at
org.powermock.core.classloader.MockClassLoader.loadMockClass(MockClassLoader.java:214)
at
org.powermock.core.classloader.MockClassLoader.loadModifiedClass(MockClassLoader.java:144)
at
org.powermock.core.classloader.DeferSupportingClassLoader.loadClass(DeferSupportingClassLoader.java:67)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:340)
at
sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:114)
at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:125)
at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
at sun.reflect.annotation.AnnotationParser.parseSig(AnnotationParser.java:439)
at sun.reflect.annotation.AnnotationParser.parseClassValue(AnnotationParser.java:420)
at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:724)
at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:531)
at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:355)
at sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:286)
at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120)
at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:72)
at java.lang.Class.createAnnotationData(Class.java:3410)
at java.lang.Class.annotationData(Class.java:3399)
at java.lang.Class.getAnnotations(Class.java:3335)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira