From dd9864015dbf7b2a9cc207e11471f77d7e66036e Mon Sep 17 00:00:00 2001 From: Julien Pivotto Date: Mon, 8 Feb 2016 06:32:36 +0100 Subject: [PATCH] Fix #221 - Cast pair.first as integer This commit fixes the following compilation error: ``` :app:compileDebugJavaWithJavac /home/bob/dev/Gadgetbridge/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/LimitedQueue.java:26: error: incomparable types: Object and int if (pair.first == id) { ^ Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 error :app:compileDebugJavaWithJavac FAILED FAILURE: Build failed with an exception. ``` --- .../nodomain/freeyourgadget/gadgetbridge/util/LimitedQueue.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/LimitedQueue.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/LimitedQueue.java index 42bc1566a..eb8ef7aa2 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/LimitedQueue.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/LimitedQueue.java @@ -23,7 +23,7 @@ public class LimitedQueue { public void remove(int id) { for (Iterator iter = list.iterator(); iter.hasNext(); ) { Pair pair = iter.next(); - if (pair.first == id) { + if ((Integer) pair.first == id) { iter.remove(); } }