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
Hi,
I have to randomize an object with an empty enum :
publicenumMyEnum {
}
Can we consider getRandomValue of EnumRandomizer return null if enumConstants.size() equal zero?
Actually it throw
Caused by: java.lang.IllegalArgumentException: bound must be positive
at java.base/java.util.Random.nextInt(Random.java:388)
at org.jeasy.random.randomizers.misc.EnumRandomizer.getRandomValue(EnumRandomizer.java:120)
at org.jeasy.random.EasyRandom.randomize(EasyRandom.java:179)
Can make a PR.
The text was updated successfully, but these errors were encountered:
Hi,
I have to randomize an object with an empty enum :
Can we consider
getRandomValue
ofEnumRandomizer
returnnull
ifenumConstants.size()
equal zero?Actually it throw
Can make a PR.
The text was updated successfully, but these errors were encountered: