Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
removed warnings
Michael Peter Christen461a0ce052ea
diff --git a/htroot/sharedBlacklist_p.java b/htroot/sharedBlacklist_p.javaindex c78337521..2704cc9d5 100644--- a/htroot/sharedBlacklist_p.java+++ b/htroot/sharedBlacklist_p.java@@ -210,7 +210,6 @@ public class sharedBlacklist_p {prop.put("page", "1"); //result pageprop.put("status", STATUS_ENTRIES_ADDED); //list of added Entries- int count = 0;//couter of added entriesPrintWriter pw = null;try {// open the blacklist file@@ -238,7 +237,6 @@ public class sharedBlacklist_p {// append the item to the filepw.println(newItem);- count++;if (Switchboard.urlBlacklist != null) {final String supportedBlacklistTypesStr = Blacklist.BLACKLIST_TYPES_STRING;final String[] supportedBlacklistTypes = supportedBlacklistTypesStr.split(",");diff --git a/source/de/anomic/crawler/CrawlProfile.java b/source/de/anomic/crawler/CrawlProfile.javaindex c5a6e24bc..ecbffa3e1 100644--- a/source/de/anomic/crawler/CrawlProfile.java+++ b/source/de/anomic/crawler/CrawlProfile.java@@ -34,7 +34,6 @@ import java.util.concurrent.ConcurrentHashMap;import java.util.regex.Pattern;import de.anomic.server.serverObjects;-import de.anomic.server.servletProperties;import net.yacy.cora.document.ASCII;import net.yacy.cora.document.MultiProtocolURI;diff --git a/source/de/anomic/crawler/CrawlStacker.java b/source/de/anomic/crawler/CrawlStacker.javaindex 1da8a6726..966ecabac 100644--- a/source/de/anomic/crawler/CrawlStacker.java+++ b/source/de/anomic/crawler/CrawlStacker.java@@ -67,7 +67,6 @@ public final class CrawlStacker {private final Log log = new Log("STACKCRAWL");private final WorkflowProcessor<Request> fastQueue, slowQueue;- private long dnsMiss;private final CrawlQueues nextQueue;private final CrawlSwitchboard crawler;private final Segment indexSegment;@@ -89,8 +88,6 @@ public final class CrawlStacker {this.crawler = cs;this.indexSegment = indexSegment;this.peers = peers;- //this.dnsHit = 0;- this.dnsMiss = 0;this.acceptLocalURLs = acceptLocalURLs;this.acceptGlobalURLs = acceptGlobalURLs;this.domainList = domainList;@@ -179,7 +176,6 @@ public final class CrawlStacker {} else {try {this.slowQueue.enQueue(entry);- this.dnsMiss++;} catch (final InterruptedException e) {Log.logException(e);}diff --git a/source/net/yacy/cora/sorting/WeakPriorityBlockingQueue.java b/source/net/yacy/cora/sorting/WeakPriorityBlockingQueue.javaindex 879e6e5ed..720b3674b 100644--- a/source/net/yacy/cora/sorting/WeakPriorityBlockingQueue.java+++ b/source/net/yacy/cora/sorting/WeakPriorityBlockingQueue.java@@ -25,6 +25,7 @@package net.yacy.cora.sorting;+import java.io.Serializable;import java.util.ArrayList;import java.util.Comparator;import java.util.Iterator;@@ -39,10 +40,11 @@ import java.util.concurrent.TimeUnit;* If the queue gets larger that the given maxsize, then elements from the tail of the queue* are drained (deleted).*/-public class WeakPriorityBlockingQueue<E> {+public class WeakPriorityBlockingQueue<E> implements Serializable {-- private final TreeSet<Element<E>> queue; // object within the stack, ordered using a TreeSet+ private static final long serialVersionUID = 4573442576760691887L;++ private final TreeSet<Element<E>> queue; // object within the stack, ordered using a TreeSetprivate final Semaphore enqueued; // semaphore for elements in the stackprivate final ArrayList<Element<E>> drained; // objects that had been on the stack but had been removedprotected int maxsize;@@ -274,7 +276,7 @@ public class WeakPriorityBlockingQueue<E> {return this.drained.iterator();}- public interface Element<E> {+ public interface Element<E> extends Serializable {public long getWeight();public E getElement();public boolean equals(Element<E> o);@@ -284,9 +286,11 @@ public class WeakPriorityBlockingQueue<E> {public String toString();}- protected abstract static class AbstractElement<E> implements Element<E> {+ protected abstract static class AbstractElement<E> implements Element<E>, Serializable {++ private static final long serialVersionUID = -7026597258248026566L;- public long weight;+ public long weight;public E element;public long getWeight() {@@ -318,7 +322,9 @@ public class WeakPriorityBlockingQueue<E> {*/public static class NaturalElement<E> extends AbstractElement<E> implements Element<E>, Comparable<NaturalElement<E>>, Comparator<NaturalElement<E>> {- public NaturalElement(final E element, final long weight) {+ private static final long serialVersionUID = 6816543012966928794L;++ public NaturalElement(final E element, final long weight) {this.element = element;this.weight = weight;}@@ -347,7 +353,9 @@ public class WeakPriorityBlockingQueue<E> {*/public static class ReverseElement<E> extends AbstractElement<E> implements Element<E>, Comparable<ReverseElement<E>>, Comparator<ReverseElement<E>> {- public ReverseElement(final E element, final long weight) {+ private static final long serialVersionUID = -8166724491837508921L;++ public ReverseElement(final E element, final long weight) {this.element = element;this.weight = weight;}diff --git a/source/net/yacy/document/content/dao/ImportDump.java b/source/net/yacy/document/content/dao/ImportDump.javaindex 4bb67575d..c33abbe27 100644--- a/source/net/yacy/document/content/dao/ImportDump.java+++ b/source/net/yacy/document/content/dao/ImportDump.java@@ -59,7 +59,6 @@ public class ImportDump {FileUtils.copy(dump, baos);String s = UTF8.String(baos.toByteArray());- int batchSize = 0;int p, q;String t;loop: while (s.length() > 0) {@@ -78,11 +77,9 @@ public class ImportDump {s = s.substring(p);//if (batchSize + t.length() >= maxBatch) {statement.executeBatch();- batchSize = 0;//}System.out.println(t);statement.addBatch(t);- batchSize += t.length();}statement.executeBatch();} catch (SQLException e) {diff --git a/source/net/yacy/document/importer/OAIListFriendsLoader.java b/source/net/yacy/document/importer/OAIListFriendsLoader.javaindex 34d92a873..9331a82b1 100644--- a/source/net/yacy/document/importer/OAIListFriendsLoader.java+++ b/source/net/yacy/document/importer/OAIListFriendsLoader.java@@ -27,6 +27,7 @@ import java.io.File;import java.io.FileInputStream;import java.io.IOException;import java.io.InputStream;+import java.io.Serializable;import java.net.MalformedURLException;import java.util.HashMap;import java.util.Map;@@ -51,7 +52,7 @@ import org.xml.sax.helpers.DefaultHandler;import de.anomic.crawler.retrieval.Response;-public class OAIListFriendsLoader {+public class OAIListFriendsLoader implements Serializable {private static final long serialVersionUID = -8705115274655024604L;@@ -117,7 +118,7 @@ public class OAIListFriendsLoader {}// get a resumption token using a SAX xml parser from am input stream- private static class Parser extends DefaultHandler {+ public static class Parser extends DefaultHandler {// class variablesprivate final StringBuilder buffer;@@ -161,6 +162,10 @@ public class OAIListFriendsLoader {<baseURL id="http://roar.eprints.org/id/eprint/1064">http://oai.repec.openlib.org/</baseURL></BaseURLs>*/++ public int getCounter() {+ return this.recordCounter;+ }public void startElement(final String uri, final String name, final String tag, final Attributes atts) throws SAXException {if ("baseURL".equals(tag)) {diff --git a/source/net/yacy/kelondro/blob/MapColumnIndex.java b/source/net/yacy/kelondro/blob/MapColumnIndex.javaindex 34ed4ab93..c8e0f8b4b 100644--- a/source/net/yacy/kelondro/blob/MapColumnIndex.java+++ b/source/net/yacy/kelondro/blob/MapColumnIndex.java@@ -25,6 +25,7 @@package net.yacy.kelondro.blob;+import java.io.Serializable;import java.util.ArrayList;import java.util.Collection;import java.util.HashMap;@@ -38,7 +39,7 @@ import net.yacy.kelondro.order.NaturalOrder;/*** a mapping from a column name to maps with the value of the columns to the primary keys where the entry exist in the table*/-public class MapColumnIndex {+public class MapColumnIndex implements Serializable {private static final long serialVersionUID=-424741536889467566L;diff --git a/source/net/yacy/kelondro/util/ByteArray.java b/source/net/yacy/kelondro/util/ByteArray.javaindex 6dc21e9d2..fe05ea19f 100644--- a/source/net/yacy/kelondro/util/ByteArray.java+++ b/source/net/yacy/kelondro/util/ByteArray.java@@ -44,12 +44,10 @@ import net.yacy.cora.order.ByteOrder;public class ByteArray {private final byte[] buffer;- private final int hash;public ByteArray(final byte[] bb) {this.buffer = bb;- this.hash = 0;}public int length() {diff --git a/source/net/yacy/search/query/RWIProcess.java b/source/net/yacy/search/query/RWIProcess.javaindex c2aafb61b..5c19b2eb7 100644--- a/source/net/yacy/search/query/RWIProcess.java+++ b/source/net/yacy/search/query/RWIProcess.java@@ -271,7 +271,6 @@ public final class RWIProcess extends Thread|| pattern.equals("smb://.*")|| pattern.equals("file://.*");long remaining;- int count = 0;pollloop: while ( true ) {remaining = timeout - System.currentTimeMillis();if (remaining <= 0) {@@ -287,8 +286,6 @@ public final class RWIProcess extends Threadbreak pollloop;}assert (iEntry.urlhash().length == index.row().primaryKeyLength);- //if (iEntry.urlHash().length() != index.row().primaryKeyLength) continue;- count++;// increase flag countsfor ( int j = 0; j < 32; j++ ) {diff --git a/source/net/yacy/search/query/SnippetProcess.java b/source/net/yacy/search/query/SnippetProcess.javaindex 6a6188210..e1cf414f0 100644--- a/source/net/yacy/search/query/SnippetProcess.java+++ b/source/net/yacy/search/query/SnippetProcess.java@@ -461,7 +461,6 @@ public class SnippetProcess {final boolean nav_topics = SnippetProcess.this.query.navigators.equals("all") || SnippetProcess.this.query.navigators.indexOf("topics",0) >= 0;try {//System.out.println("DEPLOYED WORKER " + id + " FOR " + this.neededResults + " RESULTS, timeoutd = " + (this.timeout - System.currentTimeMillis()));- int loops = 0;while (this.shallrun && System.currentTimeMillis() < this.timeout) {//Log.logInfo("SnippetProcess", "***** timeleft = " + (this.timeout - System.currentTimeMillis()));this.lastLifeSign = System.currentTimeMillis();@@ -509,7 +508,6 @@ public class SnippetProcess {}}- loops++;resultEntry = fetchSnippet(page, solrContent, this.cacheStrategy); // does not fetch snippets if snippetMode == 0if (resultEntry == null){