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.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running tests with parameters that are abstract classes on Android or in older JVMs, a NullPointerException is thrown.
java.lang.NullPointerException: Attempt to read from null array
at javassist.util.proxy.SecurityActions.getCallerClass(SecurityActions.java:54)
at javassist.util.proxy.DefineClassHelper$Java7.defineClass(DefineClassHelper.java:174)
at javassist.util.proxy.DefineClassHelper.toClass(DefineClassHelper.java:260)
at javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:154)
at javassist.util.proxy.ProxyFactory.createClass3(ProxyFactory.java:640)
at javassist.util.proxy.ProxyFactory.createClass2(ProxyFactory.java:624)
at javassist.util.proxy.ProxyFactory.createClass1(ProxyFactory.java:560)
at javassist.util.proxy.ProxyFactory.createClass(ProxyFactory.java:481)
at javassist.util.proxy.ProxyFactory.create(ProxyFactory.java:828)
at io.mockative.fake.ValueOfJVM.makeValueOf(ValueOf.kt:55)
at io.mockative.fake.ValueOfJVM.makeValueOf(ValueOf.kt:31)
at io.mockative.fake.ValueOfKt.valueOf(ValueOf.kt:84)
How to reproduce
Run an Android emulator or connect a physical Android device
./gradlew :shared:connectedDebugAndroidTest
Cause
It seems Javassist doesn't like Android when instantiating proxy classes:
The text was updated successfully, but these errors were encountered:
vitorhugods
changed the title
valueOf doesn't support abstract parameters on AndroidvalueOf doesn't support abstract parameters on Instrumented Android Tests
Apr 12, 2024
Issue
When running tests with parameters that are abstract classes on Android or in older JVMs, a
NullPointerException
is thrown.How to reproduce
./gradlew :shared:connectedDebugAndroidTest
Cause
It seems Javassist doesn't like Android when instantiating proxy classes:
Maybe use a solution similar to MockK's?
The text was updated successfully, but these errors were encountered: