Fixing improper boxing to Integer instead of Long.
This is tricky: entry.getMessageBox() returns int, so it is by default boxed to Integer. Map.get() however accepts Objects, so it ignores the difference, but nothing is find during lookup, just because Long and Integer objects are compared using equals(), which has to lead to 'false' result. So, explicit boxning to Long is unnecessary here. Change-Id: I967a7829a8926410a00274c6b5e312e1af567299
This commit is contained in:
@@ -235,7 +235,7 @@ public final class PduCache extends AbstractCache<Uri, PduCacheEntry> {
|
||||
}
|
||||
|
||||
private void removeFromMessageBoxes(Uri key, PduCacheEntry entry) {
|
||||
HashSet<Uri> msgBox = mThreads.get(entry.getMessageBox());
|
||||
HashSet<Uri> msgBox = mThreads.get(Long.valueOf(entry.getMessageBox()));
|
||||
if (msgBox != null) {
|
||||
msgBox.remove(key);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user