Skip to content
This repository was archived by the owner on Oct 21, 2020. It is now read-only.

Commit 8a041a1

Browse files
committed
1 parent b034522 commit 8a041a1

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

src/main/java/difflib/algorithm/myers/MyersDiff.java

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -217,29 +217,4 @@ private Patch<T> buildRevision(PathNode actualPath, List<T> orig, List<T> rev) {
217217
private List<T> copyOfRange(final List<T> original, final int fromIndex, final int to) {
218218
return new ArrayList<>(original.subList(fromIndex, to));
219219
}
220-
221-
/**
222-
* Copied here from JDK 1.6
223-
*/
224-
@SuppressWarnings("unchecked")
225-
public static <T> T[] copyOfRange2(T[] original, int from, int to) {
226-
return copyOfRange2(original, from, to, (Class<T[]>) original.getClass());
227-
}
228-
229-
/**
230-
* Copied here from JDK 1.6
231-
*/
232-
@SuppressWarnings("unchecked")
233-
public static <T, U> T[] copyOfRange2(U[] original, int from, int to,
234-
Class<? extends T[]> newType) {
235-
int newLength = to - from;
236-
if (newLength < 0) {
237-
throw new IllegalArgumentException(from + " > " + to);
238-
}
239-
T[] copy = ((Object) newType == (Object) Object[].class) ? (T[]) new Object[newLength]
240-
: (T[]) Array.newInstance(newType.getComponentType(), newLength);
241-
System.arraycopy(original, from, copy, 0, Math.min(original.length - from, newLength));
242-
return copy;
243-
}
244-
245220
}

0 commit comments

Comments
 (0)