Skip to content

Commit 85df69d

Browse files
mp911dechristophstrobl
authored andcommitted
Extend copy signature for Number subclasses.
1 parent c97a699 commit 85df69d

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/main/java/org/springframework/data/domain/DoubleVector.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ static Vector copy(double[] v) {
4848
/**
4949
* Copy the given numeric values and wrap within a Vector.
5050
*/
51-
static Vector copy(Collection<Number> v) {
51+
static Vector copy(Collection<? extends Number> v) {
5252

5353
double[] copy = new double[v.size()];
5454
int i = 0;

src/main/java/org/springframework/data/domain/FloatVector.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ static Vector copy(float[] v) {
4848
/**
4949
* Copy the given numeric values and wrap within a Vector.
5050
*/
51-
static Vector copy(Collection<Number> v) {
51+
static Vector copy(Collection<? extends Number> v) {
5252

5353
float[] copy = new float[v.size()];
5454
int i = 0;

src/main/java/org/springframework/data/domain/NumberVector.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ static Vector copy(Number[] v) {
4848
/**
4949
* Copy the given {@link Number} and wrap it within a Vector.
5050
*/
51-
static Vector copy(Collection<Number> numbers) {
51+
static Vector copy(Collection<? extends Number> numbers) {
5252

5353
Number[] copy = new Number[numbers.size()];
5454

src/main/java/org/springframework/data/domain/Vector.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ static Vector of(double... values) {
7272
* @param values number vector values.
7373
* @return the {@link Vector} for the given vector values.
7474
*/
75-
static Vector of(Collection<Number> values) {
75+
static Vector of(Collection<? extends Number> values) {
7676

7777
Assert.notNull(values, "Vector values must not be null");
7878

0 commit comments

Comments
 (0)