IdentityHashMap.java (get): Fix off-by-one error.
* java/util/IdentityHashMap.java (get): Fix off-by-one error. (put): Likewise. From-SVN: r45077
This commit is contained in:
parent
e9e4208a18
commit
71038fd576
2 changed files with 7 additions and 2 deletions
|
@ -172,7 +172,7 @@ public class IdentityHashMap extends AbstractMap
|
|||
if (table[h] == emptyslot)
|
||||
return null;
|
||||
h += 2;
|
||||
if (h > table.length)
|
||||
if (h >= table.length)
|
||||
h = 0;
|
||||
if (h == save)
|
||||
return null;
|
||||
|
@ -257,7 +257,7 @@ public class IdentityHashMap extends AbstractMap
|
|||
break;
|
||||
}
|
||||
h += 2;
|
||||
if (h > table.length)
|
||||
if (h >= table.length)
|
||||
h = 0;
|
||||
if (h == save)
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue