Imported GNU Classpath 0.19 + gcj-import-20051115.
* sources.am: Regenerated. * Makefile.in: Likewise. * scripts/makemake.tcl: Use glob -nocomplain. From-SVN: r107049
This commit is contained in:
parent
02e549bfaa
commit
8f523f3a10
1241 changed files with 97711 additions and 25284 deletions
|
@ -241,7 +241,8 @@ public class WeakHashMap extends AbstractMap implements Map
|
|||
// This method will get inlined.
|
||||
cleanQueue();
|
||||
if (knownMod != modCount)
|
||||
throw new ConcurrentModificationException();
|
||||
throw new ConcurrentModificationException(knownMod + " != "
|
||||
+ modCount);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -698,21 +699,20 @@ public class WeakHashMap extends AbstractMap implements Map
|
|||
// bucket may be enqueued later by the garbage collection, and
|
||||
// internalRemove will be called a second time.
|
||||
bucket.slot = -1;
|
||||
if (buckets[slot] == bucket)
|
||||
buckets[slot] = bucket.next;
|
||||
else
|
||||
|
||||
WeakBucket prev = null;
|
||||
WeakBucket next = buckets[slot];
|
||||
while (next != bucket)
|
||||
{
|
||||
WeakBucket prev = buckets[slot];
|
||||
/* This may throw a NullPointerException. It shouldn't but if
|
||||
* a race condition occurred (two threads removing the same
|
||||
* bucket at the same time) it may happen. <br>
|
||||
* But with race condition many much worse things may happen
|
||||
* anyway.
|
||||
*/
|
||||
while (prev.next != bucket)
|
||||
prev = prev.next;
|
||||
prev.next = bucket.next;
|
||||
if (next == null) throw new InternalError("WeakHashMap in incosistent state");
|
||||
prev = next;
|
||||
next = prev.next;
|
||||
}
|
||||
if (prev == null)
|
||||
buckets[slot] = bucket.next;
|
||||
else
|
||||
prev.next = bucket.next;
|
||||
|
||||
size--;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue