mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-06-05 21:49:48 +02:00
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. ```
This commit is contained in:
@@ -23,7 +23,7 @@ public class LimitedQueue {
|
||||
public void remove(int id) {
|
||||
for (Iterator<Pair> iter = list.iterator(); iter.hasNext(); ) {
|
||||
Pair pair = iter.next();
|
||||
if (pair.first == id) {
|
||||
if ((Integer) pair.first == id) {
|
||||
iter.remove();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user