Ignore depcreciation - we're using the method correctly.

This commit is contained in:
Kristian S. Stangeland 2012-12-06 04:04:07 +01:00
parent 6530db23b7
commit af546e7f1d
5 changed files with 12 additions and 5 deletions

View File

@ -4,7 +4,7 @@
<groupId>com.comphenix.protocol</groupId>
<artifactId>ProtocolLib</artifactId>
<name>ProtocolLib</name>
<version>1.7.2-SNAPSHOT</version>
<version>1.8.0-SNAPSHOT</version>
<description>Provides read/write access to the Minecraft protocol.</description>
<url>http://dev.bukkit.org/server-mods/protocollib/</url>
<developers>

View File

@ -47,6 +47,7 @@ class CommandProtocol extends CommandBase {
return true;
}
@SuppressWarnings("deprecation")
public void checkVersion(final CommandSender sender) {
// Perform on an async thread
plugin.getServer().getScheduler().scheduleAsyncDelayedTask(plugin, new Runnable() {
@ -64,6 +65,7 @@ class CommandProtocol extends CommandBase {
updateFinished();
}
@SuppressWarnings("deprecation")
public void updateVersion(final CommandSender sender) {
// Perform on an async thread
plugin.getServer().getScheduler().scheduleAsyncDelayedTask(plugin, new Runnable() {

View File

@ -242,7 +242,7 @@ public class AsyncListenerHandler {
final AsyncRunnable listenerLoop = getListenerLoop();
filterManager.getScheduler().scheduleAsyncDelayedTask(listener.getPlugin(), new Runnable() {
scheduleAsync(new Runnable() {
@Override
public void run() {
Thread thread = Thread.currentThread();
@ -290,7 +290,7 @@ public class AsyncListenerHandler {
final AsyncRunnable listenerLoop = getListenerLoop();
final Function<AsyncRunnable, Void> delegateCopy = executor;
filterManager.getScheduler().scheduleAsyncDelayedTask(listener.getPlugin(), new Runnable() {
scheduleAsync(new Runnable() {
@Override
public void run() {
delegateCopy.apply(listenerLoop);
@ -298,6 +298,11 @@ public class AsyncListenerHandler {
});
}
@SuppressWarnings("deprecation")
private void scheduleAsync(Runnable runnable) {
filterManager.getScheduler().scheduleAsyncDelayedTask(listener.getPlugin(), runnable);
}
/**
* Create a friendly thread name using the following convention:
* <p><code>

View File

@ -28,7 +28,6 @@ import java.net.SocketAddress;
import net.sf.cglib.proxy.Factory;
import org.bukkit.entity.Player;
import org.bukkit.scheduler.BukkitWorker;
import com.comphenix.protocol.Packets;
import com.comphenix.protocol.error.ErrorReporter;

View File

@ -234,7 +234,8 @@ class Metrics {
*
* @return True if statistics measuring is running, otherwise false.
*/
public boolean start() {
@SuppressWarnings("deprecation")
public boolean start() {
synchronized (optOutLock) {
// Did we opt out?
if (isOptOut()) {