Enum with One Value
Closed this issue · 1 comments
ZouhaierSebri commented
When i Have an Enum with One value I got this error
ERROR org.bbottema.loremipsumobjects.typefactories.ClassBasedFactory - error logged:
java.lang.IllegalArgumentException: bound must be positive
at java.base/java.util.concurrent.ThreadLocalRandom.nextInt(ThreadLocalRandom.java:310)
Yes There is always a solution by using ClassBindings for my specific enum like
result.bind(SingleTypeEnum.class, new FixedInstanceFactory<>(SingleTypeEnum.TYPE1));