Skip to content

Commit

Permalink
Permit upcasting
Browse files Browse the repository at this point in the history
  • Loading branch information
Sollace committed Nov 14, 2024
1 parent 072f3cd commit d9feff1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
*/
public class Slider extends AbstractSlider<Float> {

public Slider(int x, int y, float min, float max, Supplier<Float> value) {
this(x, y, min, max, Objects.requireNonNull(value.get(), "value was null"));
public Slider(int x, int y, float min, float max, Supplier<? extends Number> value) {
this(x, y, min, max, Objects.requireNonNull(value.get(), "value was null").floatValue());
}

public Slider(int x, int y, float min, float max, float value) {
Expand Down

0 comments on commit d9feff1

Please sign in to comment.