-
Notifications
You must be signed in to change notification settings - Fork 70
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
Failig to mock Interfaces with Java 14 #204
Milestone
Comments
Thanks, yes for interfaces it would be easier if I used the old mockery
strategy
…On Thu, 24 Sep 2020, 08:09 Michael Blaszczyk, ***@***.***> wrote:
When using Mockery with ByteBuddyClassImportiser (version 2.12.0) to mock
any interface with java 14, it fails with an error like:
java.lang.IllegalStateException: No code generation strategy available
at org.jmock.imposters.ByteBuddyClassImposteriser.proxyClass(ByteBuddyClassImposteriser.java:167)
at org.jmock.imposters.ByteBuddyClassImposteriser.access$000(ByteBuddyClassImposteriser.java:41)
at org.jmock.imposters.ByteBuddyClassImposteriser$1.apply(ByteBuddyClassImposteriser.java:100)
at org.jmock.imposters.ByteBuddyClassImposteriser$1.apply(ByteBuddyClassImposteriser.java:96)
at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1740)
at org.jmock.imposters.ByteBuddyClassImposteriser.proxy(ByteBuddyClassImposteriser.java:95)
at org.jmock.imposters.ByteBuddyClassImposteriser.imposterise(ByteBuddyClassImposteriser.java:66)
at org.jmock.Mockery.mock(Mockery.java:167)
at org.jmock.Mockery.mock(Mockery.java:143)
With java 13 and below mocking classes and interfaces worked well using
ByteBuddyClassImportiser. Also Mockery with default Importiser can still
mock interfaces in java 14.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#204>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACAVUAER4KN7RRE7OQP65LSHLWD3ANCNFSM4RX5XCDQ>
.
|
Actually, updating byte buddy manually to the current version (1.10.16) resolved the issue. |
I added latest bytebuddy dependency into pom.xml and the problem is gone.
) |
Fixed #252 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When using Mockery with ByteBuddyClassImportiser (version 2.12.0) to mock any interface with java 14, it fails with an error like:
With java 13 and below mocking classes and interfaces worked well using ByteBuddyClassImportiser. Also Mockery with default Importiser can still mock interfaces in java 14.
The text was updated successfully, but these errors were encountered: