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
Is your feature request related to a problem? Please describe.
A developer wanted help with their code producing the following error message
Kotlin
val controller =Robolectric.buildActivity(AbstractClass::class.java)
Stack Trace
java.lang.RuntimeException: error instantiating com.ichi2.anki.AbstractFlashcardViewer
at org.robolectric.util.ReflectionHelpers.callConstructor(ReflectionHelpers.java:440)
at org.robolectric.Robolectric.buildActivity(Robolectric.java:113)
at org.robolectric.Robolectric.buildActivity(Robolectric.java:78)
at com.ichi2.anki.AbstractFlashcardViewerCommandTest.testRefreshIfRequired(AbstractFlashcardViewerCommandTest.kt:163)
Caused by:
java.lang.InstantiationException
at java.base/jdk.internal.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(InstantiationExceptionConstructorAccessorImpl.java:48)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
at org.robolectric.util.ReflectionHelpers.callConstructor(ReflectionHelpers.java:438)
... 3 more
Describe the solution you'd like
The error message should state that the provided class is abstract (and that abstract classes are not supported)
Is your feature request related to a problem? Please describe.
A developer wanted help with their code producing the following error message
Kotlin
Stack Trace
Describe the solution you'd like
The error message should state that the provided class is abstract (and that abstract classes are not supported)
Describe alternatives you've considered
N/A
Additional context
Sample
isAbstract
checking codehttps://stackoverflow.com/a/1072895
robolectric/shadowapi/src/main/java/org/robolectric/util/ReflectionHelpers.java
Lines 446 to 469 in 76048c0
The text was updated successfully, but these errors were encountered: