-
Notifications
You must be signed in to change notification settings - Fork 236
Open
Description
there is a bug in BigDecimalRangeRandomizer constructor method
public BigDecimalRangeRandomizer(final Double min, final Double max, final Integer scale, final RoundingMode roundingMode) {
delegate = new DoubleRangeRandomizer(min, max, scale); // <<< the scale passed to seed
this.roundingMode = roundingMode;
}the scale parameter should be passed to this.scale, but instead it passed to DoubleRangeRandomizer constructor,
which dont deal with scale, but with the seed
public DoubleRangeRandomizer(final Double min, final Double max, final long seed)the correct solution may looks like
public BigDecimalRangeRandomizer(final Double min, final Double max, final Integer scale, final RoundingMode roundingMode) {
delegate = new DoubleRangeRandomizer(min, max);
this.scale = scale;
this.roundingMode = roundingMode;
}affected version: 5.0.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels