forked from pool/concurrent
30 lines
970 B
Diff
30 lines
970 B
Diff
--- concurrent/ConcurrentHashMap.java 2002-04-01 00:26:24.000000000 +0200
|
|
+++ concurrent/ConcurrentHashMap.java 2017-09-14 18:31:06.532780244 +0200
|
|
@@ -654,7 +654,7 @@
|
|
* <code>null</code>.
|
|
*/
|
|
public Object remove(Object key) {
|
|
- return remove(key, null);
|
|
+ return removeCompat(key, null);
|
|
}
|
|
|
|
|
|
@@ -673,7 +673,7 @@
|
|
* <code>null</code>.
|
|
*/
|
|
|
|
- protected Object remove(Object key, Object value) {
|
|
+ protected Object removeCompat(Object key, Object value) {
|
|
/*
|
|
Find the entry, then
|
|
1. Set value field to null, to force get() to retry
|
|
@@ -944,7 +944,7 @@
|
|
if (!(o instanceof Map.Entry))
|
|
return false;
|
|
Map.Entry e = (Map.Entry)o;
|
|
- return ConcurrentHashMap.this.remove(e.getKey(), e.getValue()) != null;
|
|
+ return ConcurrentHashMap.this.removeCompat(e.getKey(), e.getValue()) != null;
|
|
}
|
|
public int size() {
|
|
return ConcurrentHashMap.this.size();
|