Skip to content
This repository was archived by the owner on May 11, 2018. It is now read-only.

Commit a02559c

Browse files
committed
Fixes #390
1 parent 4cdc76d commit a02559c

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

  • mq/main/persist/disk-io/src/main/java/com/sun/messaging/jmq/io/disk

mq/main/persist/disk-io/src/main/java/com/sun/messaging/jmq/io/disk/PHashMap.java

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ record = (VRecordRAF)backingFile.allocate(data.length);
339339
return oldValue;
340340
}
341341

342+
@Override
342343
public Object remove(Object key) {
343344
checkLoaded();
344345

@@ -363,6 +364,7 @@ public boolean replace(Object key, Object oldValue, Object newValue) {
363364
throw new UnsupportedOperationException("Operation not supported");
364365
}
365366

367+
@Override
366368
public void clear() {
367369
checkLoaded();
368370

@@ -395,14 +397,7 @@ public Set entrySet() {
395397
public ConcurrentHashMap.KeySetView keySet() {
396398
checkLoaded();
397399

398-
ConcurrentHashMap.KeySetView set = keySet;
399-
if (set == null) {
400-
ConcurrentHashMap map = new ConcurrentHashMap(this);
401-
keySet = map.keySet();
402-
set = keySet;
403-
}
404-
405-
return set;
400+
return super.keySet();
406401
}
407402

408403
public VRFileWarning getWarning() {
@@ -439,7 +434,6 @@ final Object putInHashMap(Object key, Object value, boolean putIfAbsent) {
439434
// Views: key set, entry set, and value collection
440435

441436
private Set entrySet = null;
442-
private ConcurrentHashMap.KeySetView keySet = null;
443437
private Collection values = null;
444438

445439
private void removeFromFile(Object key) throws IOException {

0 commit comments

Comments
 (0)