Patch from Dave to avoid potential disaster when Java decides remove(Integer)
should mean a call to remove(Object) instead of unboxing the integer and calling remove(int). Beware bogus boxing. git-svn-id: https://samskivert.googlecode.com/svn/trunk@2585 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -332,7 +332,7 @@ public class IntIntMap
|
||||
if (!(o instanceof Integer)) {
|
||||
return false;
|
||||
}
|
||||
return remove((Integer)o);
|
||||
return remove(((Integer)o).intValue());
|
||||
}
|
||||
|
||||
public boolean remove (int value) {
|
||||
@@ -388,8 +388,7 @@ public class IntIntMap
|
||||
int[] ret = new int[_size];
|
||||
|
||||
int dex = 0;
|
||||
for (int ii=0, nn=_buckets.length; ii < nn; ii++) {
|
||||
Record r = _buckets[ii];
|
||||
for (Record r : _buckets) {
|
||||
while (r != null) {
|
||||
ret[dex++] = keys ? r.key : r.value;
|
||||
r = r.next;
|
||||
|
||||
Reference in New Issue
Block a user