From d1ab1b59be0315fcf5c9070f5e35f9654389fdfa Mon Sep 17 00:00:00 2001 From: Simon MacDonald Date: Tue, 2 Oct 2012 11:42:12 -0400 Subject: [PATCH] Remove @Override from interface methods In Java 6 you will get an error in Eclipse if your put the @Override annotation on a method of an interface. You are not really over riding the methods you are implementing it. This is an undocumented change in Java 6. Just cleaning up our usage of this so some project problems got away. Note: Things will build fine using 'ant jar' even with the @Override's. --- framework/src/org/apache/cordova/DroidGap.java | 1 - framework/src/org/apache/cordova/Echo.java | 2 +- framework/src/org/apache/cordova/FileTransfer.java | 3 --- framework/src/org/apache/cordova/NativeToJsMessageQueue.java | 1 - framework/src/org/apache/cordova/api/LegacyContext.java | 1 - 5 files changed, 1 insertion(+), 7 deletions(-) diff --git a/framework/src/org/apache/cordova/DroidGap.java b/framework/src/org/apache/cordova/DroidGap.java index f648ab89..eac3eba6 100755 --- a/framework/src/org/apache/cordova/DroidGap.java +++ b/framework/src/org/apache/cordova/DroidGap.java @@ -1056,7 +1056,6 @@ public class DroidGap extends Activity implements CordovaInterface { return null; } - @Override public ExecutorService getThreadPool() { return threadPool; } diff --git a/framework/src/org/apache/cordova/Echo.java b/framework/src/org/apache/cordova/Echo.java index b91c3c43..78146e79 100644 --- a/framework/src/org/apache/cordova/Echo.java +++ b/framework/src/org/apache/cordova/Echo.java @@ -33,7 +33,7 @@ public class Echo extends CordovaPlugin { return true; } else if ("echoAsync".equals(action)) { cordova.getThreadPool().execute(new Runnable() { - @Override public void run() { + public void run() { callbackContext.success(result); } }); diff --git a/framework/src/org/apache/cordova/FileTransfer.java b/framework/src/org/apache/cordova/FileTransfer.java index be3a11f5..da3bad45 100644 --- a/framework/src/org/apache/cordova/FileTransfer.java +++ b/framework/src/org/apache/cordova/FileTransfer.java @@ -205,7 +205,6 @@ public class FileTransfer extends CordovaPlugin { } cordova.getThreadPool().execute(new Runnable() { - @Override public void run() { if (context.aborted) { return; @@ -615,7 +614,6 @@ public class FileTransfer extends CordovaPlugin { } cordova.getThreadPool().execute(new Runnable() { - @Override public void run() { if (context.aborted) { return; @@ -810,7 +808,6 @@ public class FileTransfer extends CordovaPlugin { } // Closing the streams can block, so execute on a background thread. cordova.getThreadPool().execute(new Runnable() { - @Override public void run() { synchronized (context) { safeClose(context.currentInputStream); diff --git a/framework/src/org/apache/cordova/NativeToJsMessageQueue.java b/framework/src/org/apache/cordova/NativeToJsMessageQueue.java index 54c6eed3..55fa2054 100755 --- a/framework/src/org/apache/cordova/NativeToJsMessageQueue.java +++ b/framework/src/org/apache/cordova/NativeToJsMessageQueue.java @@ -293,7 +293,6 @@ public class NativeToJsMessageQueue { private class OnlineEventsBridgeMode implements BridgeMode { boolean online = true; final Runnable runnable = new Runnable() { - @Override public void run() { if (!queue.isEmpty()) { online = !online; diff --git a/framework/src/org/apache/cordova/api/LegacyContext.java b/framework/src/org/apache/cordova/api/LegacyContext.java index b8bc0ae8..c3030381 100644 --- a/framework/src/org/apache/cordova/api/LegacyContext.java +++ b/framework/src/org/apache/cordova/api/LegacyContext.java @@ -148,7 +148,6 @@ public class LegacyContext implements CordovaInterface { this.cordova.getActivity().unbindService(conn); } - @Override public ExecutorService getThreadPool() { Log.i(LOG_TAG, "Replace ctx.getThreadPool() with cordova.getThreadPool()"); return this.cordova.getThreadPool();