mirror of
https://github.com/Freeyourgadget/Gadgetbridge
synced 2026-04-06 23:25:40 +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:
parent
0c4e606e74
commit
dd9864015d
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user