-
Notifications
You must be signed in to change notification settings - Fork 234
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
Fundamental issue in random-beans-validation #237
Comments
PascalSchumacher
added a commit
to PascalSchumacher/easy-random
that referenced
this issue
Feb 15, 2017
PascalSchumacher
added a commit
to PascalSchumacher/easy-random
that referenced
this issue
Feb 16, 2017
fmbenhassine
added a commit
that referenced
this issue
Feb 16, 2017
make random-beans-validation more random (fixes #237)
Hi @devoto13 Thank you for reporting this. We have deployed a fix in 3.6.0-SNAPSHOT. Could you please give it a try and tell us if this is ok for you? Kind regards |
@benas @PascalSchumacher Thank you, guys, for a quick fix! I tried it and it works very well. Closing the issue. |
Thanks reporting the issue and for the feedback on the fix. 👍 😃 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I found fundamental problem in
random-beans-validation
implementation. Currently every randomizer created by the package will generate same value every time (or almost every time, see below).Let's for example look into
SizeAnnotationHandler
.Every time randomizer is looked up for field annotated with
@Size
it will create new instance ofCharacterRandomizer
providing it with same seed and therefore randomizer will generate same value every time. Or almost every time, because randomizer for string length is not using seed (but it should). Other annotation handlers have same issue, except those generating constant values (for obvious reasons).Ideal solution would be to somehow cache randomizers created for the field from annotation. But I'm not good with Java, so not sure how feasible/doable it is.
The text was updated successfully, but these errors were encountered: