]
Shigeru Chiba resolved JASSIST-142.
-----------------------------------
Fix Version/s: 3.15.0-GA
Resolution: Done
Javassist throws a CannotCompileException on the
org.codehaus.groovy.runtime.ArrayUtil class
--------------------------------------------------------------------------------------------
Key: JASSIST-142
URL:
https://issues.jboss.org/browse/JASSIST-142
Project: Javassist
Issue Type: Bug
Affects Versions: 3.14.0.GA
Environment: N/A
Reporter: Robert Elliot
Assignee: Shigeru Chiba
Fix For: 3.15.0-GA
With Groovy 1.7.5 on the classpath the following snippet throws a
CannotCompileException:
{noformat}ClassPool classPool = new ClassPool();
classPool.appendSystemPath();
CtClass ctClass = classPool.get("org.codehaus.groovy.runtime.ArrayUtil");
ctClass.toBytecode();{noformat}
This is currently preventing me using PowerMock in a test case written in Groovy, which
seems a shame. It appears to be due to an artificial limit imposed in
ClassPoolTail.copyStream(InputStream, OutputStream).
Here is the stack trace:
{noformat}Exception in thread "main" javassist.CannotCompileException: by
java.io.IOException: too much data
at javassist.CtClassType.toBytecode(CtClassType.java:1438)
at javassist.CtClass.toBytecode(CtClass.java:1279)
at Test.main(Test.java:13)
Caused by: java.io.IOException: too much data
at javassist.ClassPoolTail.copyStream(ClassPoolTail.java:440)
at javassist.ClassPoolTail.writeClassfile(ClassPoolTail.java:290)
at javassist.ClassPool.writeClassfile(ClassPool.java:637)
at javassist.CtClassType.toBytecode(CtClassType.java:1426)
... 7 more
{noformat}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: