Skip to content

Commit 5b0e87f

Browse files
committed
Remove superfluous Arrays.fill(…) from ArrayUtils.getArrayClass(…).
Closes #813
1 parent 06a1cb3 commit 5b0e87f

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/main/java/org/springframework/data/r2dbc/support/ArrayUtils.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
package org.springframework.data.r2dbc.support;
1717

1818
import java.lang.reflect.Array;
19-
import java.util.Arrays;
2019

2120
import org.springframework.util.Assert;
2221

@@ -73,10 +72,7 @@ public static Class<?> getArrayClass(Class<?> componentType, int dimensions) {
7372

7473
Assert.notNull(componentType, "Component type must not be null");
7574

76-
int[] lengths = new int[dimensions];
77-
Arrays.fill(lengths, 0);
78-
79-
return Array.newInstance(componentType, lengths).getClass();
75+
return Array.newInstance(componentType, new int[dimensions]).getClass();
8076
}
8177

8278
/**

0 commit comments

Comments
 (0)