-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: check for valid candidate before picking
Since we pick a random class from the found implementations, we want to filter out unsuitable candidates before we pick one. Otherwise, we might pick one that can't be used while we skip other candidates which would have worked. This also resolves a potential NPE when creating a GenericSpecimen with mismatching type-parameters.
- Loading branch information
Showing
1 changed file
with
9 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters