From 8a041a10e2804cc46bcd8e66e2eeb7a46ccb87e5 Mon Sep 17 00:00:00 2001 From: wumpz Date: Thu, 13 Apr 2017 08:49:12 +0200 Subject: [PATCH] --- .../difflib/algorithm/myers/MyersDiff.java | 25 ------------------- 1 file changed, 25 deletions(-) diff --git a/src/main/java/difflib/algorithm/myers/MyersDiff.java b/src/main/java/difflib/algorithm/myers/MyersDiff.java index a4a39ec..8dceca9 100644 --- a/src/main/java/difflib/algorithm/myers/MyersDiff.java +++ b/src/main/java/difflib/algorithm/myers/MyersDiff.java @@ -217,29 +217,4 @@ public final class MyersDiff implements DiffAlgorithm { private List copyOfRange(final List original, final int fromIndex, final int to) { return new ArrayList<>(original.subList(fromIndex, to)); } - - /** - * Copied here from JDK 1.6 - */ - @SuppressWarnings("unchecked") - public static T[] copyOfRange2(T[] original, int from, int to) { - return copyOfRange2(original, from, to, (Class) original.getClass()); - } - - /** - * Copied here from JDK 1.6 - */ - @SuppressWarnings("unchecked") - public static T[] copyOfRange2(U[] original, int from, int to, - Class newType) { - int newLength = to - from; - if (newLength < 0) { - throw new IllegalArgumentException(from + " > " + to); - } - T[] copy = ((Object) newType == (Object) Object[].class) ? (T[]) new Object[newLength] - : (T[]) Array.newInstance(newType.getComponentType(), newLength); - System.arraycopy(original, from, copy, 0, Math.min(original.length - from, newLength)); - return copy; - } - }