removed superfluous synchronization

pull/1/head
Michael Peter Christen 11 years ago
parent a1977b7a75
commit 5695280edd

@ -363,9 +363,7 @@ public class HeapReader {
log.severe("this.index == null in size(); closeDate=" + this.closeDate + ", now=" + new Date() + this.heapFile == null ? "" : (" file = " + this.heapFile.toString()));
return 0;
}
synchronized (this.index) {
return (this.index == null) ? 0 : this.index.size();
}
return (this.index == null) ? 0 : this.index.size();
}
public boolean isEmpty() {
@ -374,9 +372,7 @@ public class HeapReader {
log.severe("this.index == null in isEmpty(); closeDate=" + this.closeDate + ", now=" + new Date() + this.heapFile == null ? "" : (" file = " + this.heapFile.toString()));
return true;
}
synchronized (this.index) {
return this.index.isEmpty();
}
return this.index.isEmpty();
}
/**

@ -389,12 +389,12 @@ public class MapDataMining extends MapHeap {
}
@Override
public synchronized int size() {
public int size() {
return super.size();
}
@Override
public synchronized boolean isEmpty() {
public boolean isEmpty() {
return super.isEmpty();
}

@ -440,12 +440,12 @@ public class MapHeap implements Map<byte[], Map<String, String>> {
* @return the number of entries in the table
*/
@Override
public synchronized int size() {
public int size() {
return (this.blob == null) ? 0 : this.blob.size();
}
@Override
public synchronized boolean isEmpty() {
public boolean isEmpty() {
return (this.blob == null) ? true : this.blob.isEmpty();
}

Loading…
Cancel
Save