-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
Consider calling state.Action#precondition, state.Action#transformer without reflection #331
Comments
PS. I'm not sure this is an issue, and it looks like GitHub Discussions might be better for these types of "issues". |
Why does the reflective call bother you? It's not called so often that a performance problem is likely. Reflection is currently necessary to determine if the methods at hand are overridden. The subsequent call of the overridden method could, I assume, be done statically. |
Stacktraces become harder to understand.
That is exactly my suggestion. |
Reasonable argument. Since Action will probably be refactored into two separate interfaces, I'll defer until this is done. |
Has been resolved with the introduction of |
Testing Problem
I'm trying the new API from #134, and I see jqwik calls
state.Action
methods via reflection.It makes it harder to understand the stacktrace.
Suggested Solution
Call interface methods without reflection.
Discussion
Is reflection needed there?
I do understand the reflection might help the engine to verify if the class has a non-trivial method implementation, however, I believe calling the method via reflection is both easier to understand, faster, and less prone to errors.
The text was updated successfully, but these errors were encountered: