Deprecate and stop using Java15Compat class.

By: md_5 <git@md-5.net>
This commit is contained in:
Bukkit/Spigot
2016-07-29 17:28:25 +10:00
parent f0bfb0fdf7
commit 3b51e3f230
4 changed files with 11 additions and 7 deletions

View File

@@ -2,6 +2,7 @@ package org.bukkit.util;
import org.bukkit.ChatColor;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
@@ -46,7 +47,7 @@ public class ChatPaginator {
int from = (actualPageNumber - 1) * pageHeight;
int to = from + pageHeight <= lines.length ? from + pageHeight : lines.length;
String[] selectedLines = Java15Compat.Arrays_copyOfRange(lines, from, to);
String[] selectedLines = Arrays.copyOfRange(lines, from, to);
return new ChatPage(selectedLines, actualPageNumber, totalPages);
}

View File

@@ -2,6 +2,11 @@ package org.bukkit.util;
import java.lang.reflect.Array;
/**
* @deprecated Bukkit targets Java 1.6. This class will be removed in a
* subsequent release.
*/
@Deprecated
public class Java15Compat {
@SuppressWarnings("unchecked")
public static <T> T[] Arrays_copyOfRange(T[] original, int start, int end) {