Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
Improved indentation for easier debugging steps.
lucciomanfeaa87005ec7
diff --git a/source/net/yacy/cora/sorting/WeakPriorityBlockingQueue.java b/source/net/yacy/cora/sorting/WeakPriorityBlockingQueue.javaindex c926303f0..844812c32 100644--- a/source/net/yacy/cora/sorting/WeakPriorityBlockingQueue.java+++ b/source/net/yacy/cora/sorting/WeakPriorityBlockingQueue.java@@ -120,10 +120,14 @@ public class WeakPriorityBlockingQueue<E> implements Serializable {*/public synchronized void put(final Element<E> element) {// put the element on the stack- if (this.drained != null && this.drained.contains(element)) return;+ if (this.drained != null && this.drained.contains(element)) {+ return;+ }if (this.queue.size() == this.maxsize) {// remove last elements if stack is too large- if (this.queue.add(element)) this.queue.remove(this.queue.last());+ if (this.queue.add(element)) {+ this.queue.remove(this.queue.last());+ }} else {// just add entry but only release semaphore if entry was not doubleif (this.queue.add(element)) this.enqueued.release();