Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

easymock 3.6 can't work with JDK11 EA kit #218

Closed
ffang opened this Issue Jun 14, 2018 · 4 comments

Comments

Projects
None yet
3 participants
@ffang
Copy link

ffang commented Jun 14, 2018

get exception like

java.lang.IllegalArgumentException: Unsupported class file major version 55
	at org.easymock.asm.ClassReader.<init>(ClassReader.java:166)
	at org.easymock.asm.ClassReader.<init>(ClassReader.java:148)
	at org.easymock.asm.ClassReader.<init>(ClassReader.java:136)
	at org.easymock.asm.ClassReader.<init>(ClassReader.java:237)
	at org.easymock.cglib.proxy.BridgeMethodResolver.resolveAll(BridgeMethodResolver.java:69)
	at org.easymock.cglib.proxy.Enhancer.emitMethods(Enhancer.java:1132)
	at org.easymock.cglib.proxy.Enhancer.generateClass(Enhancer.java:630)
	at org.easymock.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
	at org.easymock.cglib.core.AbstractClassGenerator.generate(AbstractClassGenerator.java:329)
	at org.easymock.cglib.proxy.Enhancer.generate(Enhancer.java:492)
	at org.easymock.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:93)
	at org.easymock.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:91)
	at org.easymock.cglib.core.internal.LoadingCache$2.call(LoadingCache.java:54)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at org.easymock.cglib.core.internal.LoadingCache.createEntry(LoadingCache.java:61)
	at org.easymock.cglib.core.internal.LoadingCache.get(LoadingCache.java:34)
	at org.easymock.cglib.core.AbstractClassGenerator$ClassLoaderData.get(AbstractClassGenerator.java:116)
	at org.easymock.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:291)
	at org.easymock.cglib.proxy.Enhancer.createHelper(Enhancer.java:480)
	at org.easymock.cglib.proxy.Enhancer.createClass(Enhancer.java:337)
	at org.easymock.internal.ClassProxyFactory.createProxy(ClassProxyFactory.java:175)
	at org.easymock.internal.MocksControl.createMock(MocksControl.java:123)
	at org.easymock.internal.MocksControl.createMock(MocksControl.java:99)
	at org.easymock.EasyMockSupport.niceMock(EasyMockSupport.java:196)

Since easymock shade the asm code, and this issue get resolved in asm6.2, so easymock should upgrade to asm6.2 to work with jdk11.

I've built a easymock with asm6.2 locally and it works with jdk11

@ffang

This comment has been minimized.

Copy link
Author

ffang commented Jun 14, 2018

While I'm working on a PR, just found that this commit
0239816
already resolved it.
So now I'm looking forward to a Easymock 3.7 release.
Thanks!

@henri-tremblay henri-tremblay self-assigned this Jun 14, 2018

@henri-tremblay henri-tremblay added this to the 3.7 milestone Jun 14, 2018

@henri-tremblay

This comment has been minimized.

Copy link
Contributor

henri-tremblay commented Jun 14, 2018

Yes. You are right. It is already solved so I will close this issue and add it to the roadmap to 3.7. The release should not be far. ASM is shaded because it uses to clash a lot with other frameworks. However, with the new Java delivery pace, ASM is getting an upgrade every 2 seconds so it is getting hard to keep pace.

@aaime

This comment has been minimized.

Copy link

aaime commented Oct 25, 2018

@henri-tremblay I know that this kind of question is annoying, but it's October, do you know when the release will become available? (commenting on the "The release should not be far"... I know I know, open source is volunteer based and what we hope to do does not always turn into reality... just wondering).

@henri-tremblay

This comment has been minimized.

Copy link
Contributor

henri-tremblay commented Oct 27, 2018

@aaime I'm done with the features. I tried to deliver tonight but Android tests are currently crashing. If someone has an Android expertise, please have a look. Right now I don't know if it's the test harness or EasyMock the problem. I might also just drop it and just deliver without the Android tests.

@henri-tremblay henri-tremblay modified the milestones: 3.7, 4.0 Oct 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.