@@ -8,8 +8,9 @@ public class Java15Compat {
|
||||
if (original.length >= start && 0 <= start) {
|
||||
if (start <= end) {
|
||||
int length = end - start;
|
||||
int copyLength = Math.min( length, original.length - start);
|
||||
int copyLength = Math.min(length, original.length - start);
|
||||
T[] copy = (T[]) Array.newInstance(original.getClass().getComponentType(), length);
|
||||
|
||||
System.arraycopy(original, start, copy, 0, copyLength);
|
||||
return copy;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user