Skip to content

Commit

Permalink
Remove superfluous Arrays.fill(…) from ArrayUtils.getArrayClass(…).
Browse files Browse the repository at this point in the history
Closes #813
  • Loading branch information
mp911de committed Jan 30, 2023
1 parent 06a1cb3 commit 5b0e87f
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
package org.springframework.data.r2dbc.support;

import java.lang.reflect.Array;
import java.util.Arrays;

import org.springframework.util.Assert;

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

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();
}

/**
Expand Down

0 comments on commit 5b0e87f

Please sign in to comment.