Browse Source

Remove superfluous `Arrays.fill(…)` from `ArrayUtils.getArrayClass(…)`.

Closes #1420
pull/1486/head
Mark Paluch 3 years ago
parent
commit
0be8784969
No known key found for this signature in database
GPG Key ID: 4406B84C1661DCD1
  1. 6
      spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/support/ArrayUtils.java

6
spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/support/ArrayUtils.java

@ -16,7 +16,6 @@ @@ -16,7 +16,6 @@
package org.springframework.data.r2dbc.support;
import java.lang.reflect.Array;
import java.util.Arrays;
import org.springframework.util.Assert;
@ -73,10 +72,7 @@ public abstract class ArrayUtils { @@ -73,10 +72,7 @@ public abstract class ArrayUtils {
Assert.notNull(componentType, "Component type must not be null");
int[] lengths = new int[dimensions];
Arrays.fill(lengths, 0);
return Array.newInstance(componentType, lengths).getClass();
return Array.newInstance(componentType, new int[dimensions]).getClass();
}
/**

Loading…
Cancel
Save