Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
removed superfluous synchronization
Michael Peter Christen5695280edd0b
diff --git a/source/net/yacy/kelondro/blob/HeapReader.java b/source/net/yacy/kelondro/blob/HeapReader.javaindex 97faf0c82..6e441d34e 100644--- a/source/net/yacy/kelondro/blob/HeapReader.java+++ b/source/net/yacy/kelondro/blob/HeapReader.java@@ -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();}/**diff --git a/source/net/yacy/kelondro/blob/MapDataMining.java b/source/net/yacy/kelondro/blob/MapDataMining.javaindex f82ac01ef..cef5ca54b 100644--- a/source/net/yacy/kelondro/blob/MapDataMining.java+++ b/source/net/yacy/kelondro/blob/MapDataMining.java@@ -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();}diff --git a/source/net/yacy/kelondro/blob/MapHeap.java b/source/net/yacy/kelondro/blob/MapHeap.javaindex f0780e3a3..8aec46b90 100644--- a/source/net/yacy/kelondro/blob/MapHeap.java+++ b/source/net/yacy/kelondro/blob/MapHeap.java@@ -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();}