Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

*) set SVN properties *) minor changes

low0123b40b982564c
diff --git a/source/de/anomic/crawler/RSSLoader.java b/source/de/anomic/crawler/RSSLoader.java
index f1f8637eb..d40ba7c88 100644
--- a/source/de/anomic/crawler/RSSLoader.java
+++ b/source/de/anomic/crawler/RSSLoader.java
@@ -3,6 +3,10 @@
* Copyright 2010 by Michael Peter Christen, [email protected], Frankfurt a. M., Germany
* First released 27.8.2010 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
diff --git a/source/de/anomic/crawler/retrieval/FTPLoader.java b/source/de/anomic/crawler/retrieval/FTPLoader.java
index 807b48ff0..1775ed83c 100644
--- a/source/de/anomic/crawler/retrieval/FTPLoader.java
+++ b/source/de/anomic/crawler/retrieval/FTPLoader.java
@@ -7,9 +7,9 @@
//
// This file ist contributed by Martin Thelian
//
-// $LastChangedDate: 2006-02-20 23:57:42 +0100 (Mo, 20 Feb 2006) $
-// $LastChangedRevision: 1715 $
-// $LastChangedBy: theli $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/source/de/anomic/crawler/retrieval/FileLoader.java b/source/de/anomic/crawler/retrieval/FileLoader.java
index 2bf835774..1c3cc2be7 100644
--- a/source/de/anomic/crawler/retrieval/FileLoader.java
+++ b/source/de/anomic/crawler/retrieval/FileLoader.java
@@ -2,7 +2,11 @@
* FileLoader
* Copyright 2010 by Michael Peter Christen
* First released 25.5.2010 at http://yacy.net
- *
+ *
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
diff --git a/source/de/anomic/crawler/retrieval/SMBLoader.java b/source/de/anomic/crawler/retrieval/SMBLoader.java
index 2f46d5a3c..f707dad9a 100644
--- a/source/de/anomic/crawler/retrieval/SMBLoader.java
+++ b/source/de/anomic/crawler/retrieval/SMBLoader.java
@@ -4,9 +4,9 @@
//
// This is a part of YaCy, a peer-to-peer based search engine
//
-// $LastChangedDate: 2010-03-07 00:41:51 +0100 (So, 07 Mrz 2010) $
-// $LastChangedRevision: 6719 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/de/anomic/data/WorkTables.java b/source/de/anomic/data/WorkTables.java
index 849394cbd..cf6c0a460 100644
--- a/source/de/anomic/data/WorkTables.java
+++ b/source/de/anomic/data/WorkTables.java
@@ -4,9 +4,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
-// $LastChangedRevision: 6539 $
-// $LastChangedBy: low012 $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
@@ -87,6 +87,7 @@ public class WorkTables extends Tables {
this.bookmarks = new YMarkTables(this);
}
+ @Override
public void clear(final String tablename) throws IOException {
super.clear(tablename);
this.bookmarks.clearIndex(tablename);
diff --git a/source/de/anomic/net/UPnP.java b/source/de/anomic/net/UPnP.java
index 1f07990c6..7715501df 100644
--- a/source/de/anomic/net/UPnP.java
+++ b/source/de/anomic/net/UPnP.java
@@ -4,9 +4,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: $
-// $LastChangedRevision: $
-// $LastChangedBy: $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/de/anomic/net/whois.java b/source/de/anomic/net/whois.java
index 53cc71bc4..6154a86a0 100644
--- a/source/de/anomic/net/whois.java
+++ b/source/de/anomic/net/whois.java
@@ -3,7 +3,10 @@
// (C) by Michael Peter Christen; [email protected]
// first published on http://www.anomic.de
// Frankfurt, Germany, 2005
-// last major change: 22.03.2005
+//
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/source/de/anomic/search/AccessTracker.java b/source/de/anomic/search/AccessTracker.java
index febdefa14..863b845d5 100644
--- a/source/de/anomic/search/AccessTracker.java
+++ b/source/de/anomic/search/AccessTracker.java
@@ -4,6 +4,10 @@
* Copyright 2009 by Michael Peter Christen, [email protected], Frankfurt a. M., Germany
* First released 29.08.2009 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
diff --git a/source/de/anomic/search/ContentDomain.java b/source/de/anomic/search/ContentDomain.java
index f4271214e..c75efe4af 100644
--- a/source/de/anomic/search/ContentDomain.java
+++ b/source/de/anomic/search/ContentDomain.java
@@ -20,11 +20,11 @@ public enum ContentDomain {
}
public static ContentDomain contentdomParser(final String dom) {
- if (dom.equals("text")) return TEXT;
- else if (dom.equals("image")) return IMAGE;
- else if (dom.equals("audio")) return AUDIO;
- else if (dom.equals("video")) return VIDEO;
- else if (dom.equals("app")) return APP;
+ if ("text".equals(dom)) return TEXT;
+ else if ("image".equals(dom)) return IMAGE;
+ else if ("audio".equals(dom)) return AUDIO;
+ else if ("video".equals(dom)) return VIDEO;
+ else if ("app".equals(dom)) return APP;
return TEXT;
}
diff --git a/source/de/anomic/search/DocumentIndex.java b/source/de/anomic/search/DocumentIndex.java
index 0ece72015..df3b4eae5 100644
--- a/source/de/anomic/search/DocumentIndex.java
+++ b/source/de/anomic/search/DocumentIndex.java
@@ -4,9 +4,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2009-05-28 01:51:34 +0200 (Do, 28 Mai 2009) $
-// $LastChangedRevision: 5988 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
@@ -86,6 +86,7 @@ public class DocumentIndex extends Segment {
super(workerThreadGroup, "query-" + count);
}
+ @Override
public void run() {
DigestURI f;
URIMetadataRow resultRow;
@@ -214,6 +215,7 @@ public class DocumentIndex extends Segment {
* close the index.
* This terminates all worker threads and then closes the segment.
*/
+ @Override
public void close() {
// send termination signal to worker threads
for (int i = 0; i < this.worker.length; i++) {
diff --git a/source/de/anomic/search/MetadataRepository.java b/source/de/anomic/search/MetadataRepository.java
index 4232a6b8c..91ccd87d4 100644
--- a/source/de/anomic/search/MetadataRepository.java
+++ b/source/de/anomic/search/MetadataRepository.java
@@ -4,9 +4,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
-// $LastChangedRevision: 1986 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/de/anomic/search/Segment.java b/source/de/anomic/search/Segment.java
index fac953c69..39563d592 100644
--- a/source/de/anomic/search/Segment.java
+++ b/source/de/anomic/search/Segment.java
@@ -4,9 +4,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2009-05-28 01:51:34 +0200 (Do, 28 Mai 2009) $
-// $LastChangedRevision: 5988 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/de/anomic/search/Segments.java b/source/de/anomic/search/Segments.java
index 5e9aaf63e..c44cc8862 100644
--- a/source/de/anomic/search/Segments.java
+++ b/source/de/anomic/search/Segments.java
@@ -4,9 +4,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2009-05-28 01:51:34 +0200 (Do, 28 Mai 2009) $
-// $LastChangedRevision: 5988 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/de/anomic/tools/CryptoLib.java b/source/de/anomic/tools/CryptoLib.java
index 7979ab954..17547ba40 100644
--- a/source/de/anomic/tools/CryptoLib.java
+++ b/source/de/anomic/tools/CryptoLib.java
@@ -4,9 +4,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2008-03-14 01:16:04 +0100 (Fr, 14 Mrz 2008) $
-// $LastChangedRevision: 4558 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/de/anomic/tools/ListDirs.java b/source/de/anomic/tools/ListDirs.java
index 5db3cad4f..7de33e17a 100644
--- a/source/de/anomic/tools/ListDirs.java
+++ b/source/de/anomic/tools/ListDirs.java
@@ -4,9 +4,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: $
-// $LastChangedRevision: $
-// $LastChangedBy: $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/de/anomic/tools/PKCS12Tool.java b/source/de/anomic/tools/PKCS12Tool.java
index 18536b25d..793ef5510 100644
--- a/source/de/anomic/tools/PKCS12Tool.java
+++ b/source/de/anomic/tools/PKCS12Tool.java
@@ -7,8 +7,9 @@
//
//This file ist contributed by Martin Thelian
//
-//last change: $LastChangedDate: 2006-05-12 16:35:56 +0200 (Fr, 12 Mai 2006) $ by $LastChangedBy: theli $
-//Revision: $LastChangedRevision: 2086 $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
//This program is free software; you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
diff --git a/source/de/anomic/tools/SignatureOutputStream.java b/source/de/anomic/tools/SignatureOutputStream.java
index 8a1b161db..315369bce 100644
--- a/source/de/anomic/tools/SignatureOutputStream.java
+++ b/source/de/anomic/tools/SignatureOutputStream.java
@@ -5,9 +5,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2009-03-30 17:31:25 +0200 (Mo, 30. March 2009) $
-// $LastChangedRevision: 5756 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
@@ -69,6 +69,7 @@ public class SignatureOutputStream extends FilterOutputStream {
* write byte
* @see FilterOutputStream.write(int b)
*/
+ @Override
public void write(int b) throws IOException {
try {
signature.update((byte)b);
@@ -78,6 +79,7 @@ public class SignatureOutputStream extends FilterOutputStream {
out.write(b);
}
+ @Override
public void write(byte[] b, int off, int len) throws IOException {
try {
signature.update(b, off, len);
diff --git a/source/de/anomic/tools/bitfield.java b/source/de/anomic/tools/bitfield.java
index 625c14c34..55e78b704 100644
--- a/source/de/anomic/tools/bitfield.java
+++ b/source/de/anomic/tools/bitfield.java
@@ -3,7 +3,10 @@
// (C) by Michael Peter Christen; [email protected]
// first published on http://www.anomic.de
// Frankfurt, Germany, 2004
-// last major change: 11.08.2004
+//
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -76,6 +79,7 @@ public class bitfield {
return bb;
}
+ @Override
public String toString() {
throw new UnsupportedOperationException("testing");
/*
diff --git a/source/de/anomic/tools/cryptbig.java b/source/de/anomic/tools/cryptbig.java
index 74bf87bd1..6a7010d81 100644
--- a/source/de/anomic/tools/cryptbig.java
+++ b/source/de/anomic/tools/cryptbig.java
@@ -1,9 +1,12 @@
-// crypt.java
+// cryptbig.java
// -------------------------------------
// (C) by Michael Peter Christen; [email protected]
// first published on http://www.anomic.de
// Frankfurt, Germany, 2004
-// last major change: 13.05.2004
+//
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/source/de/anomic/tools/disorderHeap.java b/source/de/anomic/tools/disorderHeap.java
index 7615426e2..b4d5662e4 100644
--- a/source/de/anomic/tools/disorderHeap.java
+++ b/source/de/anomic/tools/disorderHeap.java
@@ -3,7 +3,10 @@
// (C) by Michael Peter Christen; [email protected]
// first published on http://www.anomic.de
// Frankfurt, Germany, 2004
-// last major change: 17.05.2004
+//
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/source/de/anomic/tools/disorderSet.java b/source/de/anomic/tools/disorderSet.java
index b5e028d34..a83333f5c 100644
--- a/source/de/anomic/tools/disorderSet.java
+++ b/source/de/anomic/tools/disorderSet.java
@@ -3,7 +3,10 @@
// (C) by Michael Peter Christen; [email protected]
// first published on http://www.anomic.de
// Frankfurt, Germany, 2004
-// last major change: 17.05.2004
+//
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -21,6 +24,7 @@
package de.anomic.tools;
+import java.util.Arrays;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
@@ -53,7 +57,7 @@ public class disorderSet extends HashSet<String> implements Set<String> {
public static void main(final String[] args) {
final disorderSet ds = new disorderSet();
- for (int i = 0; i < args.length; i++) ds.add(args[i]);
+ ds.addAll(Arrays.asList(args));
for (int i = 0; i < args.length * 3; i++) System.out.print(ds.any() + " ");
System.out.println();
}
diff --git a/source/de/anomic/tools/enumerateFiles.java b/source/de/anomic/tools/enumerateFiles.java
index 1c5f45c84..ad572ba2a 100644
--- a/source/de/anomic/tools/enumerateFiles.java
+++ b/source/de/anomic/tools/enumerateFiles.java
@@ -3,7 +3,10 @@
// (C) by Michael Peter Christen; [email protected]
// first published on http://www.anomic.de
// Frankfurt, Germany, 2004
-// last major change: 26.12.2004
+//
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -24,6 +27,7 @@ package de.anomic.tools;
import java.io.File;
import java.util.ArrayList;
import java.util.Enumeration;
+import java.util.List;
import java.util.TreeSet;
import net.yacy.kelondro.util.FileUtils;
@@ -34,7 +38,7 @@ public class enumerateFiles implements Enumeration<File> {
// implements iterative search through recursively defined subdirectories
// and return all paths to the files
- private final ArrayList<TreeSet<File>> hierarchy; // contains TreeSet elements, each TreeSet contains File Entries
+ private final List<TreeSet<File>> hierarchy; // contains TreeSet elements, each TreeSet contains File Entries
private final boolean incOrder; // if true, the smallest value is returned first
private File buffer; // the prefetch-buffer
private final boolean return_files;
diff --git a/source/de/anomic/tools/gzip.java b/source/de/anomic/tools/gzip.java
index 43971f679..d00a89b07 100644
--- a/source/de/anomic/tools/gzip.java
+++ b/source/de/anomic/tools/gzip.java
@@ -3,7 +3,10 @@
// (C) by Michael Peter Christen; [email protected]
// first published on http://www.anomic.de
// Frankfurt, Germany, 2004
-// last major change: 13.05.2004
+//
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -51,10 +54,8 @@ public class gzip {
fin.close();
fout.close();
} catch (final FileNotFoundException e) {
- //System.err.println("ERROR: file '" + inFile + "' not found");
logger.logWarning("ERROR: file '" + inFile + "' not found", e);
} catch (final IOException e) {
- //System.err.println("ERROR: IO trouble ");
logger.logWarning("ERROR: IO trouble ",e);
}
}
@@ -75,10 +76,8 @@ public class gzip {
fin.close();
fout.close();
} catch (final FileNotFoundException e) {
- //System.err.println("ERROR: file '" + inFile + "' not found");
logger.logWarning("ERROR: file '" + inFile + "' not found", e);
} catch (final IOException e) {
- //System.err.println("ERROR: IO trouble ");
logger.logWarning("ERROR: IO trouble ",e);
}
}
@@ -93,7 +92,6 @@ public class gzip {
fout.close();
return baos.toByteArray();
} catch (final IOException e) {
- //System.err.println("ERROR: IO trouble ");
logger.logWarning("ERROR: IO trouble ",e);
return null;
}
diff --git a/source/de/anomic/tools/loaderCore.java b/source/de/anomic/tools/loaderCore.java
index f86e93bfd..2df785aa2 100644
--- a/source/de/anomic/tools/loaderCore.java
+++ b/source/de/anomic/tools/loaderCore.java
@@ -3,7 +3,10 @@
// (C) by Michael Peter Christen; [email protected]
// first published on http://www.anomic.de
// Frankfurt, Germany, 2004
-// last major change: 29.09.2004
+//
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/source/de/anomic/tools/loaderThreads.java b/source/de/anomic/tools/loaderThreads.java
index b816ac4ac..7c7b21ebe 100644
--- a/source/de/anomic/tools/loaderThreads.java
+++ b/source/de/anomic/tools/loaderThreads.java
@@ -3,7 +3,10 @@
// (C) by Michael Peter Christen; [email protected]
// first published on http://www.anomic.de
// Frankfurt, Germany, 2004
-// last major change: 28.09.2004
+//
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/source/de/anomic/tools/tarTools.java b/source/de/anomic/tools/tarTools.java
index dc41c63a6..cd9d82d48 100644
--- a/source/de/anomic/tools/tarTools.java
+++ b/source/de/anomic/tools/tarTools.java
@@ -4,9 +4,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: $
-// $LastChangedRevision: $
-// $LastChangedBy: $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/de/anomic/yacy/Tray.java b/source/de/anomic/yacy/Tray.java
index 78d5bad0e..e32c27717 100644
--- a/source/de/anomic/yacy/Tray.java
+++ b/source/de/anomic/yacy/Tray.java
@@ -5,9 +5,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: $
-// $LastChangedRevision: $
-// $LastChangedBy: $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/de/anomic/yacy/dht/Dispatcher.java b/source/de/anomic/yacy/dht/Dispatcher.java
index ea453bdfe..bbce42d4d 100755
--- a/source/de/anomic/yacy/dht/Dispatcher.java
+++ b/source/de/anomic/yacy/dht/Dispatcher.java
@@ -5,9 +5,9 @@
// first published on http://yacy.net
// Frankfurt, Germany, 28.01.2009
//
-// $LastChangedDate: 2009-01-23 16:32:27 +0100 (Fr, 23 Jan 2009) $
-// $LastChangedRevision: 5514 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/source/de/anomic/yacy/dht/FlatWordPartitionScheme.java b/source/de/anomic/yacy/dht/FlatWordPartitionScheme.java
index 6a650ca8e..dfbdc30c1 100755
--- a/source/de/anomic/yacy/dht/FlatWordPartitionScheme.java
+++ b/source/de/anomic/yacy/dht/FlatWordPartitionScheme.java
@@ -5,9 +5,9 @@
// first published on http://yacy.net
// Frankfurt, Germany, 28.01.2009
//
-// $LastChangedDate: 2009-01-23 16:32:27 +0100 (Fr, 23 Jan 2009) $
-// $LastChangedRevision: 5514 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/source/de/anomic/yacy/dht/PartitionScheme.java b/source/de/anomic/yacy/dht/PartitionScheme.java
index de35fb832..187237aee 100755
--- a/source/de/anomic/yacy/dht/PartitionScheme.java
+++ b/source/de/anomic/yacy/dht/PartitionScheme.java
@@ -5,9 +5,9 @@
// first published on http://yacy.net
// Frankfurt, Germany, 28.01.2009
//
-// $LastChangedDate: 2009-01-23 16:32:27 +0100 (Fr, 23 Jan 2009) $
-// $LastChangedRevision: 5514 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/source/de/anomic/yacy/dht/PeerSelection.java b/source/de/anomic/yacy/dht/PeerSelection.java
index 419203b80..68cf45951 100755
--- a/source/de/anomic/yacy/dht/PeerSelection.java
+++ b/source/de/anomic/yacy/dht/PeerSelection.java
@@ -4,9 +4,9 @@
// first published 05.11.2008 on http://yacy.net
// Frankfurt, Germany, 2008
//
-// $LastChangedDate: 2008-09-03 02:30:21 +0200 (Mi, 03 Sep 2008) $
-// $LastChangedRevision: 5102 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/source/de/anomic/yacy/dht/Transmission.java b/source/de/anomic/yacy/dht/Transmission.java
index eb04613e6..c77bf2c2d 100644
--- a/source/de/anomic/yacy/dht/Transmission.java
+++ b/source/de/anomic/yacy/dht/Transmission.java
@@ -2,9 +2,9 @@
// (C) 2009 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 09.02.2009 on http://yacy.net
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
-// $LastChangedRevision: 1986 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/de/anomic/yacy/dht/VerticalWordPartitionScheme.java b/source/de/anomic/yacy/dht/VerticalWordPartitionScheme.java
index 1a6c9aa22..389afd325 100755
--- a/source/de/anomic/yacy/dht/VerticalWordPartitionScheme.java
+++ b/source/de/anomic/yacy/dht/VerticalWordPartitionScheme.java
@@ -5,9 +5,9 @@
// first published on http://yacy.net
// Frankfurt, Germany, 28.01.2009
//
-// $LastChangedDate: 2009-01-23 16:32:27 +0100 (Fr, 23 Jan 2009) $
-// $LastChangedRevision: 5514 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -110,7 +110,7 @@ public class VerticalWordPartitionScheme implements PartitionScheme {
return dhtDistance(word, urlHash, peer.hash.getBytes());
}
- private final long dhtDistance(final byte[] from, final String urlHash, final byte[] to) {
+ private long dhtDistance(final byte[] from, final String urlHash, final byte[] to) {
// the dht distance is a positive value between 0 and 1
// if the distance is small, the word more probably belongs to the peer
assert to != null;
diff --git a/source/de/anomic/yacy/graphics/OSMTile.java b/source/de/anomic/yacy/graphics/OSMTile.java
index 8d3c0e78b..5568736da 100644
--- a/source/de/anomic/yacy/graphics/OSMTile.java
+++ b/source/de/anomic/yacy/graphics/OSMTile.java
@@ -3,9 +3,9 @@
* Copyright 2008 by Michael Peter Christen
* First released 12.02.2008 at http://yacy.net
*
- * $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
- * $LastChangedRevision: 1986 $
- * $LastChangedBy: orbiter $
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/source/de/anomic/yacy/graphics/ProfilingGraph.java b/source/de/anomic/yacy/graphics/ProfilingGraph.java
index 80b8e80cc..061d67fce 100644
--- a/source/de/anomic/yacy/graphics/ProfilingGraph.java
+++ b/source/de/anomic/yacy/graphics/ProfilingGraph.java
@@ -4,9 +4,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
-// $LastChangedRevision: 1986 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/de/anomic/yacy/graphics/WebStructureGraph.java b/source/de/anomic/yacy/graphics/WebStructureGraph.java
index e20ef4e05..7a7d91d85 100644
--- a/source/de/anomic/yacy/graphics/WebStructureGraph.java
+++ b/source/de/anomic/yacy/graphics/WebStructureGraph.java
@@ -5,9 +5,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
-// $LastChangedRevision: 1986 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
@@ -56,9 +56,9 @@ public class WebStructureGraph {
public static int maxhosts = 20000; // maximum number of hosts in web structure map
private final Log log;
- private final File structureFile;
- TreeMap<String, String> structure_old; // <b64hash(6)>','<host> to <date-yyyymmdd(8)>{<target-b64hash(6)><target-count-hex(4)>}*
- TreeMap<String, String> structure_new;
+ private final File structureFile;
+ private final TreeMap<String, String> structure_old; // <b64hash(6)>','<host> to <date-yyyymmdd(8)>{<target-b64hash(6)><target-count-hex(4)>}*
+ private final TreeMap<String, String> structure_new;
public WebStructureGraph(final Log log, final File structureFile) {
this.log = log;
@@ -352,7 +352,7 @@ public class WebStructureGraph {
}
}
- private static final void joinStructure(final TreeMap<String, String> into, final TreeMap<String, String> from) {
+ private static void joinStructure(final TreeMap<String, String> into, final TreeMap<String, String> from) {
for (final Map.Entry<String, String> e: from.entrySet()) {
if (into.containsKey(e.getKey())) {
final Map<String, Integer> s0 = refstr2map(into.get(e.getKey()));
diff --git a/source/de/anomic/yacy/yacyChannel.java b/source/de/anomic/yacy/yacyChannel.java
index 0ac0c2994..636ba1b5f 100644
--- a/source/de/anomic/yacy/yacyChannel.java
+++ b/source/de/anomic/yacy/yacyChannel.java
@@ -3,6 +3,10 @@
* Copyright 2010 by Michael Peter Christen
* First released 29.6.2010 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
diff --git a/source/de/anomic/yacy/yacyNetwork.java b/source/de/anomic/yacy/yacyNetwork.java
index 234c12dc6..063f0ad4f 100644
--- a/source/de/anomic/yacy/yacyNetwork.java
+++ b/source/de/anomic/yacy/yacyNetwork.java
@@ -5,9 +5,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2007-07-03 22:55:47 +0000 (Di, 03 Jul 2007) $
-// $LastChangedRevision: 3950 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/de/anomic/yacy/yacyUpdateLocation.java b/source/de/anomic/yacy/yacyUpdateLocation.java
index 8f38adc66..861f7669e 100644
--- a/source/de/anomic/yacy/yacyUpdateLocation.java
+++ b/source/de/anomic/yacy/yacyUpdateLocation.java
@@ -5,9 +5,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2009-02-19 17:24:46 +0100 (Do, 19. Feb 2009) $
-// $LastChangedRevision: 5621 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/net/yacy/YaCySearchClient.java b/source/net/yacy/YaCySearchClient.java
index b3512d08c..55e642cd1 100644
--- a/source/net/yacy/YaCySearchClient.java
+++ b/source/net/yacy/YaCySearchClient.java
@@ -4,6 +4,10 @@
* Copyright 2010 by Michael Peter Christen, [email protected], Frankfurt a. M., Germany
* First released 20.09.2010 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -49,8 +53,11 @@ public class YaCySearchClient {
private String host, query;
private int port, offset;
- public YaCySearchClient(String host, int port, String query) {
- this.host = host; this.port = port; this.offset = -10; this.query = query;
+ public YaCySearchClient(final String host, final int port, final String query) {
+ this.host = host;
+ this.port = port;
+ this.offset = -10;
+ this.query = query;
}
public SearchResult next() throws IOException {
@@ -63,18 +70,24 @@ public class YaCySearchClient {
public SearchResult() throws IOException {
URL url;
Document doc;
- String u =
- "http://" + host + ":" + port + "/yacysearch.rss?verify=false" +
- "&startRecord=" + offset + "&maximumRecords=10&resource=local" +
- "&query=" + query.replaceAll(" ", "+");
+ String u = new StringBuilder().append("http://")
+ .append(host)
+ .append(":")
+ .append(port)
+ .append("/yacysearch.rss?verify=false&startRecord=")
+ .append(offset)
+ .append("&maximumRecords=10&resource=local&query=")
+ .append(query.replaceAll(" ", "+")).toString();
try { url = new URL(u); } catch (MalformedURLException e) { throw new IOException (e); }
try { doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(url.openStream()); }
catch (ParserConfigurationException e) { throw new IOException (e); }
catch (SAXException e) { throw new IOException (e); }
- NodeList nodes = doc.getElementsByTagName("item");
+ final NodeList nodes = doc.getElementsByTagName("item");
for (int i = 0; i < nodes.getLength(); i++)
this.add(new RSSEntry((Element) nodes.item(i)));
}
+
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder();
for (RSSEntry entry: this) sb.append(entry.toString());
@@ -95,8 +108,16 @@ public class YaCySearchClient {
return (child instanceof CharacterData) ?
((CharacterData) child).getData() : dflt;
}
+
+ @Override
public String toString() {
- return "Title : " + title + "\nLink : " + link + "\nDescription: " + snippet + "\n";
+ return new StringBuilder().append("Title : ")
+ .append(title)
+ .append("\nLink : ")
+ .append(link)
+ .append("\nDescription: ")
+ .append(snippet)
+ .append("\n").toString();
}
}
diff --git a/source/net/yacy/ai/example/ConnectFour.java b/source/net/yacy/ai/example/ConnectFour.java
index f56a9b7c5..0da5e8137 100755
--- a/source/net/yacy/ai/example/ConnectFour.java
+++ b/source/net/yacy/ai/example/ConnectFour.java
@@ -3,6 +3,10 @@
* Copyright 2009 by Michael Peter Christen, Frankfurt a. M., Germany
* First published 03.12.2009 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -47,6 +51,7 @@ public class ConnectFour {
public Coin nextRole() {
return (this == red) ? blue : red;
}
+ @Override
public String toString() {return this.c;}
public final static Coin[] allCoins = {red, blue};
}
@@ -74,6 +79,7 @@ public class ConnectFour {
public int hashCode() {
return this.column;
}
+ @Override
public String toString() {
return super.getRole().toString() + ":" + Integer.toString(this.column);
}
@@ -134,6 +140,7 @@ public class ConnectFour {
}
public boolean equals(Object o) {
+ if (!(o instanceof Board)) return false;
Board om = (Board) o;
Coin c0, c1;
for (int i = 0; i < b.length; i++) {
@@ -237,8 +244,9 @@ public class ConnectFour {
return moves;
}
+ @Override
public String toString() {
- StringBuffer s = new StringBuffer((width + 1) * height);
+ StringBuilder s = new StringBuilder((width + 1) * height);
Coin coin;
for (int row = height - 1; row >= 0; row--) {
s.append('\"');
diff --git a/source/net/yacy/ai/example/Hanoi.java b/source/net/yacy/ai/example/Hanoi.java
index a2f62e780..7ca41348e 100644
--- a/source/net/yacy/ai/example/Hanoi.java
+++ b/source/net/yacy/ai/example/Hanoi.java
@@ -3,6 +3,10 @@
* Copyright 2009 by Michael Peter Christen, Frankfurt a. M., Germany
* First published 03.12.2009 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -45,7 +49,7 @@ public class Hanoi {
@Override
public boolean equals(Object other) {
- return this.size == ((Coin) other).size;
+ return (other != null && other instanceof Coin && this.size == ((Coin) other).size);
}
@Override
@@ -53,6 +57,7 @@ public class Hanoi {
return this.size;
}
+ @Override
public String toString() {
return Integer.toString(size);
}
@@ -79,7 +84,10 @@ public class Hanoi {
@Override
public boolean equals(Object other) {
- return this.from == ((Move) other).from && this.to == ((Move) other).to;
+ return (other != null
+ && other instanceof Move
+ && this.from == ((Move) other).from
+ && this.to == ((Move) other).to);
}
@Override
@@ -87,6 +95,7 @@ public class Hanoi {
return 3 * this.from + 7 * this.to;
}
+ @Override
public String toString() {
return from + " -> " + to;
}
@@ -106,6 +115,7 @@ public class Hanoi {
this.moves = 0;
}
+ @Override
public String toString() {
StringBuilder s = new StringBuilder();
s.append(stacks[0].toString());
@@ -128,6 +138,7 @@ public class Hanoi {
@Override
public boolean equals(Object other) {
+ if (other == null || !(other instanceof Board)) return false;
Board b = (Board) other;
for (int i = 0; i < 3; i++) {
if (this.stacks[i].size() != b.stacks[i].size()) return false;
@@ -164,7 +175,7 @@ public class Hanoi {
}
public List<Move> explore() {
- ArrayList<Move> moves = new ArrayList<Move>();
+ final List<Move> moves = new ArrayList<Move>();
for (int from = 0; from < 3; from++) {
toloop: for (int to = 0; to < 3; to++) {
if (from == to) continue toloop;
@@ -185,11 +196,11 @@ public class Hanoi {
}
public boolean isTermination(Unirole role) {
- return stacks[0].size() == 0 && stacks[2].size() == 0;
+ return stacks[0].isEmpty() && stacks[2].isEmpty();
}
public Unirole isTermination() {
- return (stacks[0].size() == 0 && stacks[2].size() == 0) ? Unirole.unirole : null;
+ return (stacks[0].isEmpty() && stacks[2].isEmpty()) ? Unirole.unirole : null;
}
}
diff --git a/source/net/yacy/ai/example/SchwarzerPeter.java b/source/net/yacy/ai/example/SchwarzerPeter.java
index 6c41f7a40..4b5e6b356 100644
--- a/source/net/yacy/ai/example/SchwarzerPeter.java
+++ b/source/net/yacy/ai/example/SchwarzerPeter.java
@@ -26,9 +26,14 @@ public class SchwarzerPeter {
public Karte(Kartentyp kartentyp, Kartenzaehler kartenzaehler) {
this.kartentyp = kartentyp; this.kartenzaehler = kartenzaehler;
}
+ @Override
public boolean equals(Object obj) {
- return this.kartentyp == ((Karte) obj).kartentyp && this.kartenzaehler == ((Karte) obj).kartenzaehler;
+ return obj != null
+ && obj instanceof Karte
+ && this.kartentyp == ((Karte) obj).kartentyp
+ && this.kartenzaehler == ((Karte) obj).kartenzaehler;
}
+ @Override
public int hashCode() {
return this.kartentyp.hashCode() + 16 + this.kartenzaehler.hashCode();
}
@@ -77,10 +82,14 @@ public class SchwarzerPeter {
return new Spieler(n, this.spieleranzahl);
}
+ @Override
public boolean equals(Object obj) {
- return this.spielernummer == ((Spieler) obj).spielernummer;
+ return obj != null
+ && obj instanceof Spieler
+ && this.spielernummer == ((Spieler) obj).spielernummer;
}
+ @Override
public int hashCode() {
return this.spielernummer;
}
diff --git a/source/net/yacy/ai/example/testorder.java b/source/net/yacy/ai/example/testorder.java
index a8ba2a417..e719d6aa3 100755
--- a/source/net/yacy/ai/example/testorder.java
+++ b/source/net/yacy/ai/example/testorder.java
@@ -3,6 +3,10 @@
* Copyright 2009 by Michael Peter Christen, Frankfurt a. M., Germany
* First published 03.12.2009 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -29,6 +33,7 @@ public class testorder implements Comparable<testorder> {
public testorder(int x) {
this.x = x;
}
+ @Override
public String toString() {
return Integer.toString(this.x);
}
diff --git a/source/net/yacy/ai/greedy/AbstractFinding.java b/source/net/yacy/ai/greedy/AbstractFinding.java
index f9d74481f..ac8cd06ea 100755
--- a/source/net/yacy/ai/greedy/AbstractFinding.java
+++ b/source/net/yacy/ai/greedy/AbstractFinding.java
@@ -3,6 +3,10 @@
* Copyright 2009 by Michael Peter Christen, Frankfurt a. M., Germany
* First published 03.12.2009 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -48,6 +52,7 @@ public abstract class AbstractFinding<SpecificRole extends Role> implements Find
this.priority = 0;
}
+ @Override
public abstract Object clone();
/**
@@ -86,6 +91,8 @@ public abstract class AbstractFinding<SpecificRole extends Role> implements Find
return compare(this, o);
}
+ @Override
public abstract boolean equals(Object other);
+ @Override
public abstract int hashCode();
}
diff --git a/source/net/yacy/ai/greedy/AbstractModel.java b/source/net/yacy/ai/greedy/AbstractModel.java
index 6158aa852..4532c71bb 100755
--- a/source/net/yacy/ai/greedy/AbstractModel.java
+++ b/source/net/yacy/ai/greedy/AbstractModel.java
@@ -3,6 +3,10 @@
* Copyright 2009 by Michael Peter Christen, Frankfurt a. M., Germany
* First published 03.12.2009 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -29,6 +33,7 @@ public abstract class AbstractModel<SpecificRole extends Role, SpecificFinding e
this.currentRole = currentRole;
}
+ @Override
public abstract Object clone();
/**
@@ -48,6 +53,8 @@ public abstract class AbstractModel<SpecificRole extends Role, SpecificFinding e
this.currentRole = (SpecificRole) this.currentRole.nextRole();
}
+ @Override
public abstract boolean equals(Object other);
+ @Override
public abstract int hashCode();
}
diff --git a/source/net/yacy/ai/greedy/Agent.java b/source/net/yacy/ai/greedy/Agent.java
index ab15104c6..d640aa900 100755
--- a/source/net/yacy/ai/greedy/Agent.java
+++ b/source/net/yacy/ai/greedy/Agent.java
@@ -3,6 +3,10 @@
* Copyright 2009 by Michael Peter Christen, Frankfurt a. M., Germany
* First published 03.12.2009 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -197,11 +201,13 @@ public class Agent<
return list;
}
+ @Override
public int hashCode() {
return this.model.hashCode();
}
@SuppressWarnings("unchecked")
+ @Override
public boolean equals(Object om) {
if (!(om instanceof Agent)) return false;
Agent<SpecificRole, SpecificFinding, SpecificModel> a = (Agent<SpecificRole, SpecificFinding, SpecificModel>) om;
diff --git a/source/net/yacy/ai/greedy/Asset.java b/source/net/yacy/ai/greedy/Asset.java
index 555307fa0..c0a498021 100755
--- a/source/net/yacy/ai/greedy/Asset.java
+++ b/source/net/yacy/ai/greedy/Asset.java
@@ -3,6 +3,10 @@
* Copyright 2009 by Michael Peter Christen, Frankfurt a. M., Germany
* First published 03.12.2009 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -42,11 +46,13 @@ public class Asset<
return this.finding;
}
+ @Override
public int hashCode() {
return (this.finding == null) ? this.model.hashCode() : this.model.hashCode() + this.finding.hashCode();
}
@SuppressWarnings("unchecked")
+ @Override
public boolean equals(Object other) {
if (!(other instanceof Asset)) return false;
Asset<SpecificRole, SpecificFinding, SpecificModel> a = (Asset<SpecificRole, SpecificFinding, SpecificModel>) other;
diff --git a/source/net/yacy/ai/greedy/Attempts.java b/source/net/yacy/ai/greedy/Attempts.java
index 9551f38d0..f3f7f890c 100755
--- a/source/net/yacy/ai/greedy/Attempts.java
+++ b/source/net/yacy/ai/greedy/Attempts.java
@@ -3,6 +3,10 @@
* Copyright 2009 by Michael Peter Christen, Frankfurt a. M., Germany
* First published 03.12.2009 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -20,6 +24,7 @@
package net.yacy.ai.greedy;
+import java.util.Map;
import java.util.TreeMap;
import java.util.concurrent.BlockingQueue;
@@ -30,7 +35,7 @@ import java.util.concurrent.BlockingQueue;
*/
public class Attempts<SpecificRole extends Role> {
- TreeMap<Long, BlockingQueue<Finding<SpecificRole>>> stack;
+ Map<Long, BlockingQueue<Finding<SpecificRole>>> stack;
public Attempts() {
this.stack = new TreeMap<Long, BlockingQueue<Finding<SpecificRole>>>();
diff --git a/source/net/yacy/ai/greedy/Battle.java b/source/net/yacy/ai/greedy/Battle.java
index c6824b39f..69d37ac93 100755
--- a/source/net/yacy/ai/greedy/Battle.java
+++ b/source/net/yacy/ai/greedy/Battle.java
@@ -3,6 +3,10 @@
* Copyright 2009 by Michael Peter Christen, Frankfurt a. M., Germany
* First published 03.12.2009 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
diff --git a/source/net/yacy/ai/greedy/Challenge.java b/source/net/yacy/ai/greedy/Challenge.java
index 963f08b26..9504a0be2 100755
--- a/source/net/yacy/ai/greedy/Challenge.java
+++ b/source/net/yacy/ai/greedy/Challenge.java
@@ -3,6 +3,10 @@
* Copyright 2009 by Michael Peter Christen, Frankfurt a. M., Germany
* First published 03.12.2009 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -53,11 +57,13 @@ public class Challenge<
return this.finding;
}
+ @Override
public int hashCode() {
return this.agent.hashCode() + this.finding.hashCode();
}
@SuppressWarnings("unchecked")
+ @Override
public boolean equals(Object other) {
if (!(other instanceof Challenge)) return false;
Challenge<SpecificRole, SpecificFinding, SpecificModel> c = (Challenge<SpecificRole, SpecificFinding, SpecificModel>) other;
diff --git a/source/net/yacy/ai/greedy/Context.java b/source/net/yacy/ai/greedy/Context.java
index 01c9102d0..682677edd 100755
--- a/source/net/yacy/ai/greedy/Context.java
+++ b/source/net/yacy/ai/greedy/Context.java
@@ -3,6 +3,10 @@
* Copyright 2009 by Michael Peter Christen, Frankfurt a. M., Germany
* First published 03.12.2009 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
diff --git a/source/net/yacy/ai/greedy/ContextFactory.java b/source/net/yacy/ai/greedy/ContextFactory.java
index 86f12e0c1..2ebf928d5 100644
--- a/source/net/yacy/ai/greedy/ContextFactory.java
+++ b/source/net/yacy/ai/greedy/ContextFactory.java
@@ -3,6 +3,10 @@
* Copyright 2009 by Michael Peter Christen, Frankfurt a. M., Germany
* First published 03.12.2009 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
diff --git a/source/net/yacy/ai/greedy/Engine.java b/source/net/yacy/ai/greedy/Engine.java
index 8544b76e9..369940455 100755
--- a/source/net/yacy/ai/greedy/Engine.java
+++ b/source/net/yacy/ai/greedy/Engine.java
@@ -3,6 +3,10 @@
* Copyright 2009 by Michael Peter Christen, Frankfurt a. M., Germany
* First published 03.12.2009 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -73,6 +77,7 @@ public class Engine<
public class SettingRunner extends Thread {
+ @Override
public void run() {
Agent<SpecificRole, SpecificFinding, SpecificModel> agent;
Challenge<SpecificRole, SpecificFinding, SpecificModel> challenge;
@@ -115,6 +120,7 @@ public class Engine<
public class AssetRunner extends Thread {
@SuppressWarnings("unchecked")
+ @Override
public void run() {
Challenge<SpecificRole, SpecificFinding, SpecificModel> challenge;
Agent<SpecificRole, SpecificFinding, SpecificModel> agent, nextAgent;
diff --git a/source/net/yacy/ai/greedy/Finding.java b/source/net/yacy/ai/greedy/Finding.java
index bf5644278..7d3b39f0d 100755
--- a/source/net/yacy/ai/greedy/Finding.java
+++ b/source/net/yacy/ai/greedy/Finding.java
@@ -3,6 +3,10 @@
* Copyright 2009 by Michael Peter Christen, Frankfurt a. M., Germany
* First published 03.12.2009 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -65,12 +69,14 @@ public interface Finding<SpecificRole extends Role> extends Comparator<Finding<S
* @param other
* @return true if this finding is equal to the other finding
*/
+ @Override
public boolean equals(Object other);
/**
* the hash code computation, necessary to place findings into hashtables
* @return a hash code for this object
*/
+ @Override
public int hashCode();
}
diff --git a/source/net/yacy/ai/greedy/Goal.java b/source/net/yacy/ai/greedy/Goal.java
index 0d6175bf5..f13882fc3 100755
--- a/source/net/yacy/ai/greedy/Goal.java
+++ b/source/net/yacy/ai/greedy/Goal.java
@@ -3,6 +3,10 @@
* Copyright 2009 by Michael Peter Christen, Frankfurt a. M., Germany
* First published 03.12.2009 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
diff --git a/source/net/yacy/ai/greedy/Model.java b/source/net/yacy/ai/greedy/Model.java
index 0f5ce4e3d..873711121 100755
--- a/source/net/yacy/ai/greedy/Model.java
+++ b/source/net/yacy/ai/greedy/Model.java
@@ -3,6 +3,10 @@
* Copyright 2009 by Michael Peter Christen, Frankfurt a. M., Germany
* First published 03.12.2009 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -77,6 +81,7 @@ public interface Model<SpecificRole extends Role, SpecificFinding extends Findin
* do not include a computation based on latest actions
* @return a hash code
*/
+ @Override
public int hashCode();
/**
@@ -84,6 +89,7 @@ public interface Model<SpecificRole extends Role, SpecificFinding extends Findin
* @param om
* @return true if other model is equal to the current model.
*/
+ @Override
public boolean equals(Object om);
/**
diff --git a/source/net/yacy/ai/greedy/Role.java b/source/net/yacy/ai/greedy/Role.java
index b9beafa4d..7d8f68705 100755
--- a/source/net/yacy/ai/greedy/Role.java
+++ b/source/net/yacy/ai/greedy/Role.java
@@ -3,6 +3,10 @@
* Copyright 2009 by Michael Peter Christen, Frankfurt a. M., Germany
* First published 03.12.2009 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -41,12 +45,14 @@ public interface Role {
* @param obj
* @return true if the current role and the given role are equal
*/
+ @Override
public boolean equals(Object obj);
/**
* necessary hashCode method for usage of Role in hash tables
* @return a hash code of the role
*/
+ @Override
public int hashCode();
}
diff --git a/source/net/yacy/ai/greedy/Unirole.java b/source/net/yacy/ai/greedy/Unirole.java
index 0f9563eb3..fe9c417db 100644
--- a/source/net/yacy/ai/greedy/Unirole.java
+++ b/source/net/yacy/ai/greedy/Unirole.java
@@ -3,6 +3,10 @@
* Copyright 2010 by Michael Peter Christen, Frankfurt a. M., Germany
* First published 06.01.2010 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
diff --git a/source/net/yacy/cora/date/AbstractFormatter.java b/source/net/yacy/cora/date/AbstractFormatter.java
index f76ad7aef..a514e8ed9 100644
--- a/source/net/yacy/cora/date/AbstractFormatter.java
+++ b/source/net/yacy/cora/date/AbstractFormatter.java
@@ -3,6 +3,10 @@
* Copyright 2011 by Michael Peter Christen
* First released 2.1.2011 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
diff --git a/source/net/yacy/cora/date/DateFormatter.java b/source/net/yacy/cora/date/DateFormatter.java
index bac53dbbb..0e1e2e787 100644
--- a/source/net/yacy/cora/date/DateFormatter.java
+++ b/source/net/yacy/cora/date/DateFormatter.java
@@ -3,6 +3,10 @@
* Copyright 2011 by Michael Peter Christen
* First released 2.1.2011 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
diff --git a/source/net/yacy/cora/date/GenericFormatter.java b/source/net/yacy/cora/date/GenericFormatter.java
index 8c92d9df1..54b9f58ae 100644
--- a/source/net/yacy/cora/date/GenericFormatter.java
+++ b/source/net/yacy/cora/date/GenericFormatter.java
@@ -3,6 +3,10 @@
* Copyright 2011 by Michael Peter Christen
* First released 2.1.2011 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
diff --git a/source/net/yacy/cora/date/ISO8601Formatter.java b/source/net/yacy/cora/date/ISO8601Formatter.java
index 50e2b9eed..1bdb44b2c 100644
--- a/source/net/yacy/cora/date/ISO8601Formatter.java
+++ b/source/net/yacy/cora/date/ISO8601Formatter.java
@@ -3,6 +3,10 @@
* Copyright 2011 by Michael Peter Christen
* First released 2.1.2011 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
diff --git a/source/net/yacy/cora/document/ASCIIComparator.java b/source/net/yacy/cora/document/ASCIIComparator.java
index cc3a9e466..1eded6b8c 100644
--- a/source/net/yacy/cora/document/ASCIIComparator.java
+++ b/source/net/yacy/cora/document/ASCIIComparator.java
@@ -2,7 +2,11 @@
* ASCIIComparator
* Copyright 2010 by Michael Peter Christen
* First released 25.2.2011 at http://yacy.net
- *
+ *
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This file is part of YaCy Content Integration
*
* This library is free software; you can redistribute it and/or
@@ -41,6 +45,7 @@ public class ASCIIComparator implements Comparator<String> {
this.insensitive = insensitive;
}
+ @Override
public Object clone() {
return this; // because we do not have any class variables that changes
}
@@ -67,10 +72,12 @@ public class ASCIIComparator implements Comparator<String> {
return 0;
}
+ @Override
public boolean equals(Object obj) {
return (obj == this);
}
+ @Override
public int hashCode() {
return System.identityHashCode(this);
}
diff --git a/source/net/yacy/cora/document/Channel.java b/source/net/yacy/cora/document/Channel.java
index 3f08bef8d..337284af6 100644
--- a/source/net/yacy/cora/document/Channel.java
+++ b/source/net/yacy/cora/document/Channel.java
@@ -2,7 +2,11 @@
* Channel
* Copyright 2010 by Michael Peter Christen
* First released 10.5.2010 at http://yacy.net
- *
+ *
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This file is part of YaCy Content Integration
*
* This library is free software; you can redistribute it and/or
diff --git a/source/net/yacy/cora/document/Channels.java b/source/net/yacy/cora/document/Channels.java
index 06032ce4d..f2cb6f58f 100644
--- a/source/net/yacy/cora/document/Channels.java
+++ b/source/net/yacy/cora/document/Channels.java
@@ -2,7 +2,11 @@
* Channels
* Copyright 2010 by Michael Peter Christen
* First released 10.5.2010 at http://yacy.net
- *
+ *
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This file is part of YaCy Content Integration
*
* This library is free software; you can redistribute it and/or
diff --git a/source/net/yacy/cora/document/Hit.java b/source/net/yacy/cora/document/Hit.java
index b93d97ece..2c7493a40 100644
--- a/source/net/yacy/cora/document/Hit.java
+++ b/source/net/yacy/cora/document/Hit.java
@@ -2,7 +2,11 @@
* Hit
* Copyright 2010 by Michael Peter Christen
* First released 10.5.2010 at http://yacy.net
- *
+ *
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This file is part of YaCy Content Integration
*
* This library is free software; you can redistribute it and/or
diff --git a/source/net/yacy/cora/document/JSONArray.java b/source/net/yacy/cora/document/JSONArray.java
index af16e014d..badba4cd1 100644
--- a/source/net/yacy/cora/document/JSONArray.java
+++ b/source/net/yacy/cora/document/JSONArray.java
@@ -284,7 +284,7 @@ public class JSONArray {
*/
private String join(String separator) throws JSONException {
int len = length();
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
for (int i = 0; i < len; i += 1) {
if (i > 0) {
@@ -418,6 +418,7 @@ public class JSONArray {
* @return a printable, displayable, transmittable
* representation of the array.
*/
+ @Override
public String toString() {
try {
return '[' + join(",") + ']';
@@ -442,7 +443,7 @@ public class JSONArray {
return "[]";
}
int i;
- StringBuffer sb = new StringBuffer("[");
+ StringBuilder sb = new StringBuilder("[");
if (len == 1) {
sb.append(JSONObject.valueToString(this.myArrayList.get(0),
indentFactor, indent));
diff --git a/source/net/yacy/cora/document/JSONException.java b/source/net/yacy/cora/document/JSONException.java
index c5a6fde44..0aed962da 100644
--- a/source/net/yacy/cora/document/JSONException.java
+++ b/source/net/yacy/cora/document/JSONException.java
@@ -26,6 +26,7 @@ public class JSONException extends Exception {
this.cause = t;
}
+ @Override
public Throwable getCause() {
return this.cause;
}
diff --git a/source/net/yacy/cora/document/JSONObject.java b/source/net/yacy/cora/document/JSONObject.java
index 0d6944cad..0d7e540fb 100644
--- a/source/net/yacy/cora/document/JSONObject.java
+++ b/source/net/yacy/cora/document/JSONObject.java
@@ -99,6 +99,7 @@ public class JSONObject {
* so the clone method returns itself.
* @return NULL.
*/
+ @Override
protected final Object clone() {
return this;
}
@@ -110,6 +111,7 @@ public class JSONObject {
* @return true if the object parameter is the JSONObject.NULL object
* or null.
*/
+ @Override
public boolean equals(Object object) {
return object == null || object == this;
}
@@ -119,6 +121,7 @@ public class JSONObject {
* Get the "null" string value.
* @return The string "null".
*/
+ @Override
public String toString() {
return "null";
}
@@ -1114,7 +1117,7 @@ public class JSONObject {
char c = 0;
int i;
int len = string.length();
- StringBuffer sb = new StringBuffer(len + 4);
+ StringBuilder sb = new StringBuilder(len + 4);
String t;
sb.append('"');
@@ -1152,7 +1155,7 @@ public class JSONObject {
if (c < ' ' || (c >= '\u0080' && c < '\u00a0') ||
(c >= '\u2000' && c < '\u2100')) {
t = "000" + Integer.toHexString(c);
- sb.append("\\u" + t.substring(t.length() - 4));
+ sb.append("\\u").append(t.substring(t.length() - 4));
} else {
sb.append(c);
}
@@ -1292,10 +1295,11 @@ public class JSONObject {
* with <code>{</code>&nbsp;<small>(left brace)</small> and ending
* with <code>}</code>&nbsp;<small>(right brace)</small>.
*/
+ @Override
public String toString() {
try {
Iterator<?> keys = keys();
- StringBuffer sb = new StringBuffer("{");
+ StringBuilder sb = new StringBuilder("{");
while (keys.hasNext()) {
if (sb.length() > 1) {
@@ -1351,7 +1355,7 @@ public class JSONObject {
return "{}";
}
Iterator<String> keys = sortedKeys();
- StringBuffer sb = new StringBuffer("{");
+ StringBuilder sb = new StringBuilder("{");
int newindent = indent + indentFactor;
Object o;
if (n == 1) {
diff --git a/source/net/yacy/cora/document/JSONTokener.java b/source/net/yacy/cora/document/JSONTokener.java
index c47905368..92d5df0f0 100644
--- a/source/net/yacy/cora/document/JSONTokener.java
+++ b/source/net/yacy/cora/document/JSONTokener.java
@@ -241,7 +241,7 @@ public class JSONTokener {
*/
public String nextString(char quote) throws JSONException {
char c;
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
for (;;) {
c = next();
switch (c) {
@@ -297,7 +297,7 @@ public class JSONTokener {
* @return A string.
*/
public String nextTo(char d) throws JSONException {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
for (;;) {
char c = next();
if (c == d || c == 0 || c == '\n' || c == '\r') {
@@ -319,7 +319,7 @@ public class JSONTokener {
*/
public String nextTo(String delimiters) throws JSONException {
char c;
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
for (;;) {
c = next();
if (delimiters.indexOf(c) >= 0 || c == 0 ||
@@ -367,7 +367,7 @@ public class JSONTokener {
* formatting character.
*/
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
while (c >= ' ' && ",:]}/\\\"[{;=#".indexOf(c) < 0) {
sb.append(c);
c = next();
@@ -431,6 +431,7 @@ public class JSONTokener {
*
* @return " at {index} [character {character} line {line}]"
*/
+ @Override
public String toString() {
return " at " + index + " [character " + this.character + " line " + this.line + "]";
}
diff --git a/source/net/yacy/cora/document/MultiProtocolURI.java b/source/net/yacy/cora/document/MultiProtocolURI.java
index 262edfe12..a7c09e95b 100644
--- a/source/net/yacy/cora/document/MultiProtocolURI.java
+++ b/source/net/yacy/cora/document/MultiProtocolURI.java
@@ -3,6 +3,10 @@
* Copyright 2010 by Michael Peter Christen
* First released 25.5.2010 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -299,7 +303,7 @@ public class MultiProtocolURI implements Serializable, Comparable<MultiProtocolU
for(int i=0; i<domainParts.length; i++) {
final String part = domainParts[i];
if(!Punycode.isBasic(part)) {
- buffer.append("xn--" + Punycode.encode(part));
+ buffer.append("xn--").append(Punycode.encode(part));
} else {
buffer.append(part);
}
@@ -890,6 +894,7 @@ public class MultiProtocolURI implements Serializable, Comparable<MultiProtocolU
return u.toString();
}
+ @Override
public int hashCode() {
return this.toNormalform(true, true).hashCode();
}
diff --git a/source/net/yacy/cora/document/RSSMessage.java b/source/net/yacy/cora/document/RSSMessage.java
index d912073de..f7a0a9bed 100644
--- a/source/net/yacy/cora/document/RSSMessage.java
+++ b/source/net/yacy/cora/document/RSSMessage.java
@@ -3,6 +3,10 @@
* Copyright 2007 by Michael Peter Christen
* First released 16.7.2007 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -21,6 +25,7 @@
package net.yacy.cora.document;
import java.text.ParseException;
+import java.util.Arrays;
import java.util.Comparator;
import java.util.Date;
import java.util.HashSet;
@@ -56,7 +61,7 @@ public class RSSMessage implements Hit, Comparable<RSSMessage>, Comparator<RSSMe
private Token(String keylist) {
String[] k = keylist.split(",");
this.keys = new HashSet<String>();
- for (String s: k) this.keys.add(s);
+ this.keys.addAll(Arrays.asList(k));
}
public String valueFrom(Map<String, String> map, String dflt) {
@@ -115,10 +120,12 @@ public class RSSMessage implements Hit, Comparable<RSSMessage>, Comparator<RSSMe
return Token.link.valueFrom(this.map, "");
}
+ @Override
public boolean equals(Object o) {
return (o instanceof RSSMessage) && ((RSSMessage) o).getLink().equals(this.getLink());
}
+ @Override
public int hashCode() {
return getLink().hashCode();
}
@@ -204,6 +211,7 @@ public class RSSMessage implements Hit, Comparable<RSSMessage>, Comparator<RSSMe
return sb.toString();
}
+ @Override
public String toString() {
return this.map.toString();
}
diff --git a/source/net/yacy/cora/document/UTF8.java b/source/net/yacy/cora/document/UTF8.java
index 6a1e41028..1958ff5e0 100644
--- a/source/net/yacy/cora/document/UTF8.java
+++ b/source/net/yacy/cora/document/UTF8.java
@@ -3,6 +3,10 @@
* Copyright 2011 by Michael Peter Christen
* First released 25.2.2011 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
diff --git a/source/net/yacy/cora/protocol/ByteArrayBody.java b/source/net/yacy/cora/protocol/ByteArrayBody.java
index be28a5261..a73768f68 100644
--- a/source/net/yacy/cora/protocol/ByteArrayBody.java
+++ b/source/net/yacy/cora/protocol/ByteArrayBody.java
@@ -3,9 +3,9 @@
* Copyright 2010 by Sebastian Gaebel
* First released 01.07.2010 at http://yacy.net
*
- * $LastChangedDate: 2010-06-16 17:11:21 +0200 (Mi, 16 Jun 2010) $
- * $LastChangedRevision: 6974 $
- * $LastChangedBy: sixcooler $
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/source/net/yacy/cora/protocol/ConnectionInfo.java b/source/net/yacy/cora/protocol/ConnectionInfo.java
index d2912c12a..c47acb21f 100644
--- a/source/net/yacy/cora/protocol/ConnectionInfo.java
+++ b/source/net/yacy/cora/protocol/ConnectionInfo.java
@@ -4,9 +4,9 @@
* Copyright 2010 by Michael Peter Christen for LGPL
* Dual-Licensing for LGPL granted by Daniel Raap 07.08.2010 by email
*
- * $LastChangedDate: 2008-03-14 01:16:04 +0100 (Fr, 14 Mrz 2008) $
- * $LastChangedRevision: 4558 $
- * $LastChangedBy: orbiter $
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/source/net/yacy/cora/protocol/Domains.java b/source/net/yacy/cora/protocol/Domains.java
index 85fc641d1..599b6ee35 100644
--- a/source/net/yacy/cora/protocol/Domains.java
+++ b/source/net/yacy/cora/protocol/Domains.java
@@ -3,6 +3,10 @@
* Copyright 2007 by Michael Peter Christen, [email protected], Frankfurt a. M., Germany
* First released 23.7.2007 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
diff --git a/source/net/yacy/cora/protocol/Scanner.java b/source/net/yacy/cora/protocol/Scanner.java
index 2291b1bf2..cfe26efde 100644
--- a/source/net/yacy/cora/protocol/Scanner.java
+++ b/source/net/yacy/cora/protocol/Scanner.java
@@ -3,6 +3,10 @@
* Copyright 2010 by Michael Peter Christen, [email protected], Frankfurt am Main, Germany
* First released 28.10.2010 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -83,6 +87,7 @@ public class Scanner extends Thread {
public MultiProtocolURI url() throws MalformedURLException {
return new MultiProtocolURI(this.protocol.name() + "://" + getHostName() + "/");
}
+ @Override
public String toString() {
try {
return new MultiProtocolURI(this.protocol.name() + "://" + this.inetAddress.getHostAddress() + "/").toNormalform(true, false);
@@ -90,9 +95,11 @@ public class Scanner extends Thread {
return "";
}
}
+ @Override
public int hashCode() {
return this.inetAddress.hashCode();
}
+ @Override
public boolean equals(Object o) {
return (o instanceof Service) && ((Service) o).protocol == this.protocol && ((Service) o).inetAddress.equals(this.inetAddress);
}
@@ -141,7 +148,7 @@ public class Scanner extends Thread {
*/
public static boolean acceptURL(MultiProtocolURI url) {
// if the scan range is empty, then all urls are accepted
- if (scancacheScanrange == null || scancacheScanrange.size() == 0) return true;
+ if (scancacheScanrange == null || scancacheScanrange.isEmpty()) return true;
//if (System.currentTimeMillis() > scancacheValidUntilTime) return true;
InetAddress a = Domains.dnsResolve(url.getHost()); // try to avoid that!
@@ -186,6 +193,7 @@ public class Scanner extends Thread {
this(Domains.myIntranetIPs(), concurrentRunner, timeout);
}
+ @Override
public void run() {
Service uri;
try {
@@ -226,6 +234,7 @@ public class Scanner extends Thread {
this.service = service;
this.starttime = System.currentTimeMillis();
}
+ @Override
public void run() {
try {
if (TimeoutRequest.ping(this.service.getInetAddress().getHostAddress(), this.service.getProtocol().port, timeout)) {
@@ -240,7 +249,7 @@ public class Scanner extends Thread {
ftpClient.login("anonymous", "anomic@");
List<String> list = ftpClient.list("/", false);
ftpClient.CLOSE();
- access = list == null || list.size() == 0 ? Access.empty : Access.granted;
+ access = list == null || list.isEmpty() ? Access.empty : Access.granted;
} catch (IOException e) {
access = Access.denied;
}
@@ -265,9 +274,11 @@ public class Scanner extends Thread {
public long age() {
return System.currentTimeMillis() - this.starttime;
}
+ @Override
public boolean equals(Object o) {
return (o instanceof Runner) && this.service.equals(((Runner) o).service);
}
+ @Override
public int hashCode() {
return this.service.hashCode();
}
diff --git a/source/net/yacy/cora/protocol/TimeoutRequest.java b/source/net/yacy/cora/protocol/TimeoutRequest.java
index a2cfccf47..da0624ef2 100644
--- a/source/net/yacy/cora/protocol/TimeoutRequest.java
+++ b/source/net/yacy/cora/protocol/TimeoutRequest.java
@@ -3,6 +3,10 @@
* Copyright 2010 by Michael Peter Christen, [email protected], Frankfurt a. M., Germany
* First released 08.10.2007 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
diff --git a/source/net/yacy/cora/protocol/ftp/FTPClient.java b/source/net/yacy/cora/protocol/ftp/FTPClient.java
index 5b738f53e..7534ae15d 100644
--- a/source/net/yacy/cora/protocol/ftp/FTPClient.java
+++ b/source/net/yacy/cora/protocol/ftp/FTPClient.java
@@ -6,7 +6,11 @@
* last major change: 06.05.2004
* added html generation for directories: 5.9.2006
* migrated to the cora package and re-licensed under lgpl: 23.08.2010
- *
+ *
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This file is part of YaCy Content Integration
*
* This library is free software; you can redistribute it and/or
@@ -1144,6 +1148,7 @@ public class FTPClient {
*
* @see java.lang.Object#toString()
*/
+ @Override
public String toString() {
final StringBuilder info = new StringBuilder(100);
info.append(name);
@@ -2531,6 +2536,7 @@ public class FTPClient {
ftpClient.login("anonymous", "anomic@");
final LinkedBlockingQueue<entryInfo> queue = new LinkedBlockingQueue<entryInfo>();
new Thread() {
+ @Override
public void run() {
try {
sitelist(ftpClient, "/", queue);
@@ -2616,16 +2622,16 @@ public class FTPClient {
page.append("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\">\n");
page.append("<html><head>\n");
- page.append(" <title>" + title + "</title>\n");
+ page.append(" <title>").append(title).append("</title>\n");
page.append(" <meta name=\"generator\" content=\"YaCy directory listing\">\n");
if (metaRobotNoindex) {
page.append(" <meta name=\"robots\" content=\"noindex\">\n");
}
- page.append(" <base href=\"" + base + "\">\n");
+ page.append(" <base href=\"").append(base).append("\">\n");
page.append("</head><body>\n");
- page.append(" <h1>" + title + "</h1>\n");
+ page.append(" <h1>").append(title).append("</h1>\n");
if (servermessage != null && greeting != null) {
- page.append(" <p><pre>Server \"" + servermessage + "\" responded:\n");
+ page.append(" <p><pre>Server \"").append(servermessage).append("\" responded:\n");
page.append(" \n");
page.append(greeting);
page.append("\n");
@@ -2641,13 +2647,13 @@ public class FTPClient {
// with link
nameStart = line.indexOf(info.name);
page.append(line.substring(0, nameStart));
- page.append("<a href=\"" + base + info.name + ((info.type == filetype.directory) ? "/" : "") + "\">" + info.name + "</a>");
+ page.append("<a href=\"").append(base).append(info.name).append((info.type == filetype.directory) ? "/" : "").append("\">").append(info.name).append("</a>");
nameEnd = nameStart + info.name.length();
if (line.length() > nameEnd) {
page.append(line.substring(nameEnd));
}
} else if (line.startsWith("http://") || line.startsWith("ftp://") || line.startsWith("smb://") || line.startsWith("file://")) {
- page.append("<a href=\"" + line + "\">" + line + "</a>");
+ page.append("<a href=\"").append(line).append("\">").append(line).append("</a>");
} else {
// raw
page.append(line);
@@ -2656,7 +2662,7 @@ public class FTPClient {
}
page.append(" </pre>\n");
page.append(" <hr>\n");
- if (system != null) page.append(" <pre>System info: \"" + system + "\"</pre>\n");
+ if (system != null) page.append(" <pre>System info: \"").append(system).append("\"</pre>\n");
page.append("</body></html>\n");
return page;
diff --git a/source/net/yacy/cora/protocol/http/GzipCompressingEntity.java b/source/net/yacy/cora/protocol/http/GzipCompressingEntity.java
index 29a4246ea..faa625cdc 100644
--- a/source/net/yacy/cora/protocol/http/GzipCompressingEntity.java
+++ b/source/net/yacy/cora/protocol/http/GzipCompressingEntity.java
@@ -3,9 +3,9 @@
* Copyright 2010 by Sebastian Gaebel
* First released 01.07.2010 at http://yacy.net
*
- * $LastChangedDate: 2010-06-16 17:11:21 +0200 (Mi, 16 Jun 2010) $
- * $LastChangedRevision: 6922 $
- * $LastChangedBy: sixcooler $
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/source/net/yacy/cora/protocol/http/GzipDecompressingEntity.java b/source/net/yacy/cora/protocol/http/GzipDecompressingEntity.java
index 797f2bc13..a5d91cce2 100644
--- a/source/net/yacy/cora/protocol/http/GzipDecompressingEntity.java
+++ b/source/net/yacy/cora/protocol/http/GzipDecompressingEntity.java
@@ -3,9 +3,9 @@
* Copyright 2010 by Sebastian Gaebel
* First released 01.07.2010 at http://yacy.net
*
- * $LastChangedDate: 2010-06-16 17:11:21 +0200 (Mi, 16 Jun 2010) $
- * $LastChangedRevision: 7011 $
- * $LastChangedBy: sixcooler $
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/source/net/yacy/cora/protocol/http/GzipRequestInterceptor.java b/source/net/yacy/cora/protocol/http/GzipRequestInterceptor.java
index 752d938bd..42b1fdf23 100644
--- a/source/net/yacy/cora/protocol/http/GzipRequestInterceptor.java
+++ b/source/net/yacy/cora/protocol/http/GzipRequestInterceptor.java
@@ -3,9 +3,9 @@
* Copyright 2010 by Sebastian Gaebel
* First released 01.07.2010 at http://yacy.net
*
- * $LastChangedDate: 2010-06-16 17:11:21 +0200 (Mi, 16 Jun 2010) $
- * $LastChangedRevision: 7001 $
- * $LastChangedBy: sixcooler $
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/source/net/yacy/cora/protocol/http/GzipResponseInterceptor.java b/source/net/yacy/cora/protocol/http/GzipResponseInterceptor.java
index da1919992..e2b119901 100644
--- a/source/net/yacy/cora/protocol/http/GzipResponseInterceptor.java
+++ b/source/net/yacy/cora/protocol/http/GzipResponseInterceptor.java
@@ -3,9 +3,9 @@
* Copyright 2010 by Sebastian Gaebel
* First released 01.07.2010 at http://yacy.net
*
- * $LastChangedDate: 2010-06-16 17:11:21 +0200 (Mi, 16 Jun 2010) $
- * $LastChangedRevision: 7001 $
- * $LastChangedBy: sixcooler $
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/source/net/yacy/cora/protocol/http/HTTPClient.java b/source/net/yacy/cora/protocol/http/HTTPClient.java
index 15a81a139..b80ab8d9d 100644
--- a/source/net/yacy/cora/protocol/http/HTTPClient.java
+++ b/source/net/yacy/cora/protocol/http/HTTPClient.java
@@ -3,9 +3,9 @@
* Copyright 2010 by Sebastian Gaebel
* First released 01.07.2010 at http://yacy.net
*
- * $LastChangedDate: 2010-06-16 17:11:21 +0200 (Mi, 16 Jun 2010) $
- * $LastChangedRevision: 7020 $
- * $LastChangedBy: sixcooler $
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/source/net/yacy/cora/protocol/http/HTTPConnector.java b/source/net/yacy/cora/protocol/http/HTTPConnector.java
index fa9ae0108..7cf25dcc7 100644
--- a/source/net/yacy/cora/protocol/http/HTTPConnector.java
+++ b/source/net/yacy/cora/protocol/http/HTTPConnector.java
@@ -3,6 +3,10 @@
* Copyright 2010 by Michael Peter Christen
* First released 25.05.2010 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
diff --git a/source/net/yacy/cora/protocol/http/LinkExtractor.java b/source/net/yacy/cora/protocol/http/LinkExtractor.java
index 1ba832d1f..e36e2ba1f 100644
--- a/source/net/yacy/cora/protocol/http/LinkExtractor.java
+++ b/source/net/yacy/cora/protocol/http/LinkExtractor.java
@@ -3,6 +3,10 @@
* Copyright 2011 by Michael Peter Christen
* First released 2.01.2011 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
diff --git a/source/net/yacy/cora/protocol/http/ProxySettings.java b/source/net/yacy/cora/protocol/http/ProxySettings.java
index eb5f1b66f..9ad6c30f6 100644
--- a/source/net/yacy/cora/protocol/http/ProxySettings.java
+++ b/source/net/yacy/cora/protocol/http/ProxySettings.java
@@ -3,6 +3,10 @@
* Copyright 2010 by Michael Peter Christen
* First released 25.05.2010 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
diff --git a/source/net/yacy/cora/services/SearchAccumulator.java b/source/net/yacy/cora/services/SearchAccumulator.java
index ddf2fb114..e99ce5c1b 100644
--- a/source/net/yacy/cora/services/SearchAccumulator.java
+++ b/source/net/yacy/cora/services/SearchAccumulator.java
@@ -3,6 +3,10 @@
* Copyright 2010 by Michael Peter Christen
* First released 07.01.2011 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
diff --git a/source/net/yacy/cora/services/SearchHub.java b/source/net/yacy/cora/services/SearchHub.java
index d0f1a0fab..cbb9e636c 100644
--- a/source/net/yacy/cora/services/SearchHub.java
+++ b/source/net/yacy/cora/services/SearchHub.java
@@ -3,6 +3,10 @@
* Copyright 2010 by Michael Peter Christen
* First released 25.05.2010 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General private
* License as published by the Free Software Foundation; either
@@ -126,6 +130,7 @@ public class SearchHub {
* return a hash code of the search hub.
* This is computed using only the query string because that identifies the object
*/
+ @Override
public int hashCode() {
return query.hashCode();
}
diff --git a/source/net/yacy/cora/services/SearchSRURSS.java b/source/net/yacy/cora/services/SearchSRURSS.java
index e66afc424..03cb552c9 100644
--- a/source/net/yacy/cora/services/SearchSRURSS.java
+++ b/source/net/yacy/cora/services/SearchSRURSS.java
@@ -3,6 +3,10 @@
* Copyright 2010 by Michael Peter Christen
* First released 06.01.2011 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -92,6 +96,7 @@ public class SearchSRURSS extends Thread implements SearchAccumulator {
this.userAgent = userAgent;
}
+ @Override
public void run() {
searchSRURSS(results, urlBase, query, timeoutInit, maximumRecordsInit, verify, global, userAgent);
int p = 1;
@@ -119,6 +124,7 @@ public class SearchSRURSS extends Thread implements SearchAccumulator {
final boolean global,
final String userAgent) {
Thread job = new Thread() {
+ @Override
public void run() {
int startRecord = 0;
RSSMessage message;
diff --git a/source/net/yacy/cora/storage/ARC.java b/source/net/yacy/cora/storage/ARC.java
index d0cec8065..bce8447a4 100644
--- a/source/net/yacy/cora/storage/ARC.java
+++ b/source/net/yacy/cora/storage/ARC.java
@@ -4,6 +4,10 @@
* Copyright 2009 by Michael Peter Christen, [email protected], Frankfurt a. M., Germany
* First released 29.08.2009 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
diff --git a/source/net/yacy/cora/storage/ComparableARC.java b/source/net/yacy/cora/storage/ComparableARC.java
index a21186f99..24ed59eff 100644
--- a/source/net/yacy/cora/storage/ComparableARC.java
+++ b/source/net/yacy/cora/storage/ComparableARC.java
@@ -4,6 +4,10 @@
* Copyright 2010 by Michael Peter Christen, [email protected], Frankfurt a. M., Germany
* First released 24.08.2010 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -45,9 +49,11 @@ public final class ComparableARC<K, V> extends SimpleARC<K, V> implements Map<K,
this.limit = cacheSize;
this.keys = new LinkedList<K>();
}
+ @Override
public synchronized V get(Object k) {
return super.get(k);
}
+ @Override
public synchronized V put(K k, V v) {
V r = super.put(k, v);
if (r == null) keys.add(k);
@@ -59,9 +65,11 @@ public final class ComparableARC<K, V> extends SimpleARC<K, V> implements Map<K,
}
return r;
}
+ @Override
public void putAll(Map<? extends K, ? extends V> map) {
for (Map.Entry<? extends K, ? extends V> entry: map.entrySet()) put(entry.getKey(), entry.getValue());
}
+ @Override
public synchronized V remove(Object k) {
V r = super.remove(k);
if (r == null) return null;
@@ -70,18 +78,21 @@ public final class ComparableARC<K, V> extends SimpleARC<K, V> implements Map<K,
assert removed;
return r;
}
+ @Override
public synchronized Map.Entry<K,V> pollFirstEntry() {
Map.Entry<K,V> entry = super.pollFirstEntry();
boolean removed = removeFromKeys(entry.getKey());
assert removed;
return entry;
}
+ @Override
public synchronized Map.Entry<K,V> pollLastEntry() {
Map.Entry<K,V> entry = super.pollLastEntry();
boolean removed = removeFromKeys(entry.getKey());
assert removed;
return entry;
}
+ @Override
public synchronized void clear() {
super.clear();
this.keys.clear();
diff --git a/source/net/yacy/cora/storage/ConcurrentARC.java b/source/net/yacy/cora/storage/ConcurrentARC.java
index 741da71bb..bbc4740de 100644
--- a/source/net/yacy/cora/storage/ConcurrentARC.java
+++ b/source/net/yacy/cora/storage/ConcurrentARC.java
@@ -3,6 +3,10 @@
* Copyright 2009 by Michael Peter Christen, [email protected], Frankfurt a. M., Germany
* First released 17.04.2009 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -93,6 +97,7 @@ public final class ConcurrentARC<K, V> extends AbstractMap<K, V> implements Map<
* @param s
* @param v
*/
+ @Override
public final V put(final K s, final V v) {
return this.arc[getPartition(s)].put(s, v);
}
@@ -103,6 +108,7 @@ public final class ConcurrentARC<K, V> extends AbstractMap<K, V> implements Map<
* @return the value
*/
@SuppressWarnings("unchecked")
+ @Override
public final V get(final Object s) {
return this.arc[getPartition(s)].get((K) s);
}
@@ -124,6 +130,7 @@ public final class ConcurrentARC<K, V> extends AbstractMap<K, V> implements Map<
* @return
*/
@SuppressWarnings("unchecked")
+ @Override
public final boolean containsKey(final Object s) {
return this.arc[getPartition(s)].containsKey((K) s);
}
@@ -134,6 +141,7 @@ public final class ConcurrentARC<K, V> extends AbstractMap<K, V> implements Map<
* @return the old value
*/
@SuppressWarnings("unchecked")
+ @Override
public final V remove(final Object s) {
return this.arc[getPartition(s)].remove((K) s);
}
@@ -141,6 +149,7 @@ public final class ConcurrentARC<K, V> extends AbstractMap<K, V> implements Map<
/**
* clear the cache
*/
+ @Override
public final void clear() {
for (ARC<K, V> a: this.arc) a.clear();
}
@@ -149,6 +158,7 @@ public final class ConcurrentARC<K, V> extends AbstractMap<K, V> implements Map<
* get the size of the ARC.
* @return the complete number of entries in the ARC cache
*/
+ @Override
public final int size() {
int s = 0;
for (ARC<K, V> a: this.arc) s += a.size();
@@ -182,6 +192,7 @@ public final class ConcurrentARC<K, V> extends AbstractMap<K, V> implements Map<
* a hash code for this ARC
* @return a hash code
*/
+ @Override
public int hashCode() {
return this.arc.hashCode();
}
diff --git a/source/net/yacy/cora/storage/DynamicScore.java b/source/net/yacy/cora/storage/DynamicScore.java
index 3698be16f..f8485b9a3 100644
--- a/source/net/yacy/cora/storage/DynamicScore.java
+++ b/source/net/yacy/cora/storage/DynamicScore.java
@@ -3,6 +3,10 @@
* Copyright 2010 by Michael Peter Christen, [email protected], Frankfurt am Main, Germany
* First released 14.10.2010 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
diff --git a/source/net/yacy/cora/storage/HashARC.java b/source/net/yacy/cora/storage/HashARC.java
index 0f9c88fda..6d299fdf1 100644
--- a/source/net/yacy/cora/storage/HashARC.java
+++ b/source/net/yacy/cora/storage/HashARC.java
@@ -4,6 +4,10 @@
* Copyright 2009 by Michael Peter Christen, [email protected], Frankfurt a. M., Germany
* First released 17.04.2009 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
diff --git a/source/net/yacy/cora/storage/IntScore.java b/source/net/yacy/cora/storage/IntScore.java
index 72954f596..f58e11998 100644
--- a/source/net/yacy/cora/storage/IntScore.java
+++ b/source/net/yacy/cora/storage/IntScore.java
@@ -3,6 +3,10 @@
* Copyright 2010 by Michael Peter Christen, [email protected], Frankfurt am Main, Germany
* First released 14.10.2010 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -76,10 +80,12 @@ public class IntScore implements Comparable<IntScore>, Comparator<IntScore> {
if (n > this.value) this.value = n;
}
+ @Override
public boolean equals(Object o) {
return (o instanceof IntScore) && this.value == ((IntScore) o).value;
}
+ @Override
public int hashCode() {
return this.value;
// return (int) (this.value ^ (this.value >>> 32)); // hash code for long values
@@ -95,6 +101,7 @@ public class IntScore implements Comparable<IntScore>, Comparator<IntScore> {
return o1.compareTo(o2);
}
+ @Override
public String toString() {
return Integer.toString(this.value);
}
diff --git a/source/net/yacy/cora/storage/OutOfLimitsException.java b/source/net/yacy/cora/storage/OutOfLimitsException.java
index d818972de..bc102bcce 100644
--- a/source/net/yacy/cora/storage/OutOfLimitsException.java
+++ b/source/net/yacy/cora/storage/OutOfLimitsException.java
@@ -3,6 +3,10 @@
* Copyright 2006 by Michael Peter Christen, [email protected], Frankfurt am Main, Germany
* First released 17.01.2006 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
diff --git a/source/net/yacy/cora/storage/ScoreCluster.java b/source/net/yacy/cora/storage/ScoreCluster.java
index 43648bc67..159a7f36a 100644
--- a/source/net/yacy/cora/storage/ScoreCluster.java
+++ b/source/net/yacy/cora/storage/ScoreCluster.java
@@ -3,6 +3,10 @@
* Copyright 2004, 2010 by Michael Peter Christen, [email protected], Frankfurt am Main, Germany
* First released 28.09.2004 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
diff --git a/source/net/yacy/cora/storage/ScoreMap.java b/source/net/yacy/cora/storage/ScoreMap.java
index 7475a05c5..daaef0dad 100644
--- a/source/net/yacy/cora/storage/ScoreMap.java
+++ b/source/net/yacy/cora/storage/ScoreMap.java
@@ -3,6 +3,10 @@
* Copyright 2010 by Michael Peter Christen, [email protected], Frankfurt am Main, Germany
* First released 14.10.2010 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -241,6 +245,7 @@ public class ScoreMap<E> implements DynamicScore<E> {
return minObject;
}
+ @Override
public String toString() {
return map.toString();
}
diff --git a/source/net/yacy/cora/storage/SimpleARC.java b/source/net/yacy/cora/storage/SimpleARC.java
index 58b9fa99f..cfc498e4a 100644
--- a/source/net/yacy/cora/storage/SimpleARC.java
+++ b/source/net/yacy/cora/storage/SimpleARC.java
@@ -4,6 +4,10 @@
* Copyright 2009 by Michael Peter Christen, [email protected], Frankfurt a. M., Germany
* First released 17.04.2009 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -84,6 +88,7 @@ abstract class SimpleARC<K, V> extends AbstractMap<K, V> implements Map<K, V>, I
* @return the value
*/
@SuppressWarnings("unchecked")
+ @Override
public final V get(final Object s) {
V v = this.levelB.get(s);
if (v != null) return v;
@@ -123,6 +128,7 @@ abstract class SimpleARC<K, V> extends AbstractMap<K, V> implements Map<K, V>, I
* @param s
* @return
*/
+ @Override
public final boolean containsKey(final Object s) {
if (this.levelB.containsKey(s)) return true;
return this.levelA.containsKey(s);
@@ -134,6 +140,7 @@ abstract class SimpleARC<K, V> extends AbstractMap<K, V> implements Map<K, V>, I
* @param s
* @return the old value
*/
+ @Override
public final synchronized V remove(final Object s) {
final V r = this.levelB.remove(s);
if (r != null) return r;
@@ -143,6 +150,7 @@ abstract class SimpleARC<K, V> extends AbstractMap<K, V> implements Map<K, V>, I
/**
* clear the cache
*/
+ @Override
public final synchronized void clear() {
this.levelA.clear();
this.levelB.clear();
@@ -152,6 +160,7 @@ abstract class SimpleARC<K, V> extends AbstractMap<K, V> implements Map<K, V>, I
* get the size of the ARC. this returns the sum of main and ghost cache
* @return the complete number of entries in the ARC cache
*/
+ @Override
public final synchronized int size() {
return this.levelA.size() + this.levelB.size();
}
@@ -182,6 +191,7 @@ abstract class SimpleARC<K, V> extends AbstractMap<K, V> implements Map<K, V>, I
* a hash code for this ARC
* @return the hash code of one of the ARC partial hash tables
*/
+ @Override
public final int hashCode() {
return this.levelA.hashCode();
}
diff --git a/source/net/yacy/cora/storage/StaticScore.java b/source/net/yacy/cora/storage/StaticScore.java
index 149478468..0bfe8fc7e 100644
--- a/source/net/yacy/cora/storage/StaticScore.java
+++ b/source/net/yacy/cora/storage/StaticScore.java
@@ -3,6 +3,10 @@
* Copyright 2010 by Michael Peter Christen, [email protected], Frankfurt am Main, Germany
* First released 14.10.2010 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -60,6 +64,7 @@ public interface StaticScore<E> {
public E getMinKey();
+ @Override
public String toString();
public Iterator<E> keys(final boolean up);
diff --git a/source/net/yacy/cora/storage/WeakPriorityBlockingQueue.java b/source/net/yacy/cora/storage/WeakPriorityBlockingQueue.java
index f6b92a87d..a230a379c 100644
--- a/source/net/yacy/cora/storage/WeakPriorityBlockingQueue.java
+++ b/source/net/yacy/cora/storage/WeakPriorityBlockingQueue.java
@@ -4,6 +4,10 @@
* Copyright 2010 by Michael Peter Christen, [email protected], Frankfurt a. M., Germany
* First released 09.09.2010 at http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -274,7 +278,9 @@ public class WeakPriorityBlockingQueue<E> {
public long getWeight();
public E getElement();
public boolean equals(Element<E> o);
+ @Override
public int hashCode();
+ @Override
public String toString();
}
@@ -294,11 +300,13 @@ public class WeakPriorityBlockingQueue<E> {
public boolean equals(Element<E> o) {
return this.element.equals(o.getElement());
}
-
+
+ @Override
public int hashCode() {
return this.element.hashCode();
}
+ @Override
public String toString() {
return element.toString() + "/" + weight;
}
@@ -365,6 +373,7 @@ public class WeakPriorityBlockingQueue<E> {
final WeakPriorityBlockingQueue<String> a = new WeakPriorityBlockingQueue<String>(3);
//final Element<String> REVERSE_POISON = new ReverseElement<String>("", Long.MIN_VALUE);
new Thread(){
+ @Override
public void run() {
Element<String> e;
try {
diff --git a/source/net/yacy/dbtest.java b/source/net/yacy/dbtest.java
index e4109453a..41831d4f0 100644
--- a/source/net/yacy/dbtest.java
+++ b/source/net/yacy/dbtest.java
@@ -83,6 +83,7 @@ public class dbtest {
return this.value;
}
+ @Override
public String toString() {
return UTF8.String(this.key) + "#" + UTF8.String(this.value);
}
@@ -448,6 +449,7 @@ final class memprofiler extends Thread {
start = System.currentTimeMillis();
}
+ @Override
public void run() {
try {
int seconds0 = 0, kilobytes0 = 0;
diff --git a/source/net/yacy/document/SentenceReader.java b/source/net/yacy/document/SentenceReader.java
index f43adc407..fd7112a37 100644
--- a/source/net/yacy/document/SentenceReader.java
+++ b/source/net/yacy/document/SentenceReader.java
@@ -3,6 +3,10 @@
* Copyright 2011 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
* first published 09.02.2011 on http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
diff --git a/source/net/yacy/document/WordTokenizer.java b/source/net/yacy/document/WordTokenizer.java
index 27a25fe33..187088f0f 100644
--- a/source/net/yacy/document/WordTokenizer.java
+++ b/source/net/yacy/document/WordTokenizer.java
@@ -3,6 +3,10 @@
* Copyright 2011 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
* first published 09.02.2011 on http://yacy.net
*
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
diff --git a/source/net/yacy/gui/InfoPage.java b/source/net/yacy/gui/InfoPage.java
index 6d17044fe..0b7db7a60 100644
--- a/source/net/yacy/gui/InfoPage.java
+++ b/source/net/yacy/gui/InfoPage.java
@@ -3,9 +3,9 @@
* Copyright 2010 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
* First released 05.08.2010 at http://yacy.net
*
- * $LastChangedDate: 2010-06-16 17:11:21 +0200 (Mi, 16 Jun 2010) $
- * $LastChangedRevision: 6922 $
- * $LastChangedBy: orbiter $
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/source/net/yacy/gui/YaCyApp.java b/source/net/yacy/gui/YaCyApp.java
index cc425cc1a..a8db4e271 100644
--- a/source/net/yacy/gui/YaCyApp.java
+++ b/source/net/yacy/gui/YaCyApp.java
@@ -3,9 +3,9 @@
* Copyright 2010 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
* First released 05.08.2010 at http://yacy.net
*
- * $LastChangedDate: 2010-06-16 17:11:21 +0200 (Mi, 16 Jun 2010) $
- * $LastChangedRevision: 6922 $
- * $LastChangedBy: orbiter $
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -68,6 +68,7 @@ public class YaCyApp {
private static final long serialVersionUID = -8823028472678019008L;
ImageObserver obs;
public splashCanvas(ImageObserver obs) { this.obs = obs; }
+ @Override
public void paint(Graphics g) {
if (splashImg != null) g.drawImage(splashImg, 0, 0, obs);
}
@@ -131,6 +132,7 @@ public class YaCyApp {
// registering shutdown hook
log.info("Registering Shutdown Hook");
Thread t = new Thread() {
+ @Override
public void run() {
app = new Application("YaCy GUI", operation, menues, new InfoPage("localhost", 8090));
app.setLocationRelativeTo(null);
diff --git a/source/net/yacy/gui/framework/Application.java b/source/net/yacy/gui/framework/Application.java
index e2ed2f29e..659ed687d 100644
--- a/source/net/yacy/gui/framework/Application.java
+++ b/source/net/yacy/gui/framework/Application.java
@@ -3,9 +3,9 @@
* Copyright 2010 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
* First released 05.08.2010 at http://yacy.net
*
- * $LastChangedDate: 2010-06-16 17:11:21 +0200 (Mi, 16 Jun 2010) $
- * $LastChangedRevision: 6922 $
- * $LastChangedBy: orbiter $
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -49,11 +49,13 @@ public class Application extends JFrame implements DocumentListener {
getContentPane().setLayout(pageprovider.getPage((JComponent) getContentPane(), this));
this.addWindowListener(new WindowAdapter() {
+ @Override
public void windowClosing(WindowEvent e) {
operation.closeAndExit();
}
});
this.addWindowStateListener(new WindowAdapter() {
+ @Override
public void windowClosing(WindowEvent e) {
operation.closeAndExit();
}
diff --git a/source/net/yacy/gui/framework/Browser.java b/source/net/yacy/gui/framework/Browser.java
index ae69cc2ee..bb766dd4a 100644
--- a/source/net/yacy/gui/framework/Browser.java
+++ b/source/net/yacy/gui/framework/Browser.java
@@ -3,9 +3,9 @@
* Copyright 2010 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
* First released 05.08.2010 at http://yacy.net
*
- * $LastChangedDate: 2010-06-16 17:11:21 +0200 (Mi, 16 Jun 2010) $
- * $LastChangedRevision: 6922 $
- * $LastChangedBy: orbiter $
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/source/net/yacy/gui/framework/Layout.java b/source/net/yacy/gui/framework/Layout.java
index 4e77c4268..f0fb3fe7f 100644
--- a/source/net/yacy/gui/framework/Layout.java
+++ b/source/net/yacy/gui/framework/Layout.java
@@ -3,9 +3,9 @@
* Copyright 2010 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
* First released 05.08.2010 at http://yacy.net
*
- * $LastChangedDate: 2010-06-16 17:11:21 +0200 (Mi, 16 Jun 2010) $
- * $LastChangedRevision: 6922 $
- * $LastChangedBy: orbiter $
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/source/net/yacy/gui/framework/Operation.java b/source/net/yacy/gui/framework/Operation.java
index b54fc9be0..274e86266 100644
--- a/source/net/yacy/gui/framework/Operation.java
+++ b/source/net/yacy/gui/framework/Operation.java
@@ -3,9 +3,9 @@
* Copyright 2010 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
* First released 05.08.2010 at http://yacy.net
*
- * $LastChangedDate: 2010-06-16 17:11:21 +0200 (Mi, 16 Jun 2010) $
- * $LastChangedRevision: 6922 $
- * $LastChangedBy: orbiter $
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/source/net/yacy/gui/framework/Switchboard.java b/source/net/yacy/gui/framework/Switchboard.java
index 2e597d902..f67d4e943 100644
--- a/source/net/yacy/gui/framework/Switchboard.java
+++ b/source/net/yacy/gui/framework/Switchboard.java
@@ -3,9 +3,9 @@
* Copyright 2010 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
* First released 05.08.2010 at http://yacy.net
*
- * $LastChangedDate: 2010-06-16 17:11:21 +0200 (Mi, 16 Jun 2010) $
- * $LastChangedRevision: 6922 $
- * $LastChangedBy: orbiter $
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -85,6 +85,7 @@ public class Switchboard {
public InfoUpdater(long steptime) {
this.steptime = steptime;
}
+ @Override
public void run() {
while (shallrun) {
if (InfoBox != null) {
@@ -111,6 +112,7 @@ public class Switchboard {
this.shutdownSemaphore = semaphore;
}
+ @Override
public void run() {
try {
if (shallrun()) {
diff --git a/source/net/yacy/kelondro/blob/ArrayStack.java b/source/net/yacy/kelondro/blob/ArrayStack.java
index f4fdc0f5d..2f0f6bb75 100755
--- a/source/net/yacy/kelondro/blob/ArrayStack.java
+++ b/source/net/yacy/kelondro/blob/ArrayStack.java
@@ -4,7 +4,7 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
diff --git a/source/net/yacy/kelondro/blob/BEncodedHeap.java b/source/net/yacy/kelondro/blob/BEncodedHeap.java
index e889ef288..93f0df744 100644
--- a/source/net/yacy/kelondro/blob/BEncodedHeap.java
+++ b/source/net/yacy/kelondro/blob/BEncodedHeap.java
@@ -2,9 +2,9 @@
// (C) 2010 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 12.01.2010 on http://yacy.net
//
-// $LastChangedDate: 2008-03-14 01:16:04 +0100 (Fr, 14 Mrz 2008) $
-// $LastChangedRevision: 6563 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
@@ -532,6 +532,7 @@ public class BEncodedHeap implements Map<byte[], Map<String, byte[]>>, Iterable<
/**
* a hashcode for the object
*/
+ @Override
public int hashCode() {
return this.table.name().hashCode();
}
diff --git a/source/net/yacy/kelondro/blob/BLOB.java b/source/net/yacy/kelondro/blob/BLOB.java
index 4ee9e80e3..28e33a3b3 100644
--- a/source/net/yacy/kelondro/blob/BLOB.java
+++ b/source/net/yacy/kelondro/blob/BLOB.java
@@ -1,10 +1,10 @@
-// kelondroBLOB.java
+// BLOB.java
// (C) 2008 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 08.06.2008 on http://yacy.net
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
diff --git a/source/net/yacy/kelondro/blob/Compressor.java b/source/net/yacy/kelondro/blob/Compressor.java
index af28e0813..01956728c 100644
--- a/source/net/yacy/kelondro/blob/Compressor.java
+++ b/source/net/yacy/kelondro/blob/Compressor.java
@@ -4,7 +4,7 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
@@ -106,6 +106,7 @@ public class Compressor implements BLOB {
private class Worker extends Thread {
public Worker() {
}
+ @Override
public void run() {
Entity entry;
try {
diff --git a/source/net/yacy/kelondro/blob/Gap.java b/source/net/yacy/kelondro/blob/Gap.java
index 8a3cf6f6f..3ae7a3259 100644
--- a/source/net/yacy/kelondro/blob/Gap.java
+++ b/source/net/yacy/kelondro/blob/Gap.java
@@ -1,10 +1,10 @@
-// kelondroBLOBGap.java
+// Gap.java
// (C) 2008 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 30.12.2008 on http:// yacy.net
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2008-03-14 01:16:04 +0100 (Fr, 14 Mrz 2008) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
diff --git a/source/net/yacy/kelondro/blob/Heap.java b/source/net/yacy/kelondro/blob/Heap.java
index 9e4b2893b..26fb3b9cf 100755
--- a/source/net/yacy/kelondro/blob/Heap.java
+++ b/source/net/yacy/kelondro/blob/Heap.java
@@ -1,10 +1,10 @@
-// kelondroBLOBHeap.java
+// Heap.java
// (C) 2008 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 09.07.2008 on http://yacy.net
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2008-03-14 01:16:04 +0100 (Fr, 14 Mrz 2008) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
diff --git a/source/net/yacy/kelondro/blob/HeapModifier.java b/source/net/yacy/kelondro/blob/HeapModifier.java
index 8a81fbb0e..4f6da3219 100644
--- a/source/net/yacy/kelondro/blob/HeapModifier.java
+++ b/source/net/yacy/kelondro/blob/HeapModifier.java
@@ -1,8 +1,8 @@
-// kelondroBLOBHeapModifier.java
+// HeapModifier.java
// (C) 2009 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 05.01.2009 on http://yacy.net
//
-// $LastChangedDate: 2008-03-14 01:16:04 +0100 (Fr, 14 Mrz 2008) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
diff --git a/source/net/yacy/kelondro/blob/HeapReader.java b/source/net/yacy/kelondro/blob/HeapReader.java
index ee31f07cb..b1ba54839 100644
--- a/source/net/yacy/kelondro/blob/HeapReader.java
+++ b/source/net/yacy/kelondro/blob/HeapReader.java
@@ -2,7 +2,7 @@
// (C) 2008 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 30.12.2008 on http://yacy.net
//
-// $LastChangedDate: 2008-03-14 01:16:04 +0100 (Fr, 14 Mrz 2008) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
diff --git a/source/net/yacy/kelondro/blob/HeapWriter.java b/source/net/yacy/kelondro/blob/HeapWriter.java
index 155be2705..3df8dec8e 100644
--- a/source/net/yacy/kelondro/blob/HeapWriter.java
+++ b/source/net/yacy/kelondro/blob/HeapWriter.java
@@ -1,8 +1,8 @@
-// kelondroBLOBHeapWriter.java
+// HeapWriter.java
// (C) 2008 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 30.12.2008 on http://yacy.net
//
-// $LastChangedDate: 2008-03-14 01:16:04 +0100 (Fr, 14 Mrz 2008) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
diff --git a/source/net/yacy/kelondro/blob/MapDataMining.java b/source/net/yacy/kelondro/blob/MapDataMining.java
index 46a7498ac..2faec210b 100644
--- a/source/net/yacy/kelondro/blob/MapDataMining.java
+++ b/source/net/yacy/kelondro/blob/MapDataMining.java
@@ -1,11 +1,11 @@
-// kelondroMapDataMining.java
+// MapDataMining.java
// -----------------------
// (C) 29.01.2007 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 2004 as part of kelondroMap on http://www.anomic.de
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
diff --git a/source/net/yacy/kelondro/blob/MapHeap.java b/source/net/yacy/kelondro/blob/MapHeap.java
index d818b8cd9..aacc4ac2d 100644
--- a/source/net/yacy/kelondro/blob/MapHeap.java
+++ b/source/net/yacy/kelondro/blob/MapHeap.java
@@ -1,11 +1,11 @@
-// kelondroMap.java
+// MapHeap.java
// -----------------------
// (C) 29.01.2007 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 2004 as kelondroMap on http://www.anomic.de
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
diff --git a/source/net/yacy/kelondro/blob/ObjectBuffer.java b/source/net/yacy/kelondro/blob/ObjectBuffer.java
index 2daddef0c..ecaa5ce3f 100644
--- a/source/net/yacy/kelondro/blob/ObjectBuffer.java
+++ b/source/net/yacy/kelondro/blob/ObjectBuffer.java
@@ -1,4 +1,4 @@
-// kelondroObjectBuffer.java
+// ObjectBuffer.java
// ------------------------
// (C) by Michael Peter Christen; [email protected]
// first published on http://www.anomic.de
@@ -6,7 +6,7 @@
//
// This is a part of the kelondro database, which is a part of YaCy
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
diff --git a/source/net/yacy/kelondro/blob/Stack.java b/source/net/yacy/kelondro/blob/Stack.java
index 8a1d1227b..003fe5659 100644
--- a/source/net/yacy/kelondro/blob/Stack.java
+++ b/source/net/yacy/kelondro/blob/Stack.java
@@ -2,7 +2,7 @@
// (C) 2009 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 03.07.2009 on http://yacy.net
//
-// $LastChangedDate: 2008-03-14 01:16:04 +0100 (Fr, 14 Mrz 2008) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
diff --git a/source/net/yacy/kelondro/blob/Stacks.java b/source/net/yacy/kelondro/blob/Stacks.java
index 1a0d4f409..877fd5fdc 100644
--- a/source/net/yacy/kelondro/blob/Stacks.java
+++ b/source/net/yacy/kelondro/blob/Stacks.java
@@ -2,7 +2,7 @@
// (C) 2009 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 03.07.2009 on http://yacy.net
//
-// $LastChangedDate: 2008-03-14 01:16:04 +0100 (Fr, 14 Mrz 2008) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
diff --git a/source/net/yacy/kelondro/blob/Tables.java b/source/net/yacy/kelondro/blob/Tables.java
index 6de561aed..1026cf1d7 100644
--- a/source/net/yacy/kelondro/blob/Tables.java
+++ b/source/net/yacy/kelondro/blob/Tables.java
@@ -4,9 +4,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
-// $LastChangedRevision: 6539 $
-// $LastChangedBy: low012 $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
@@ -457,6 +457,7 @@ public class Tables {
}
}
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append('{');
@@ -502,6 +503,7 @@ public class Tables {
return this.pk;
}
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder(keymaxlen + 20 * this.size());
sb.append(UTF8.String(pk)).append(":").append(super.toString());
diff --git a/source/net/yacy/kelondro/data/citation/CitationReferenceRow.java b/source/net/yacy/kelondro/data/citation/CitationReferenceRow.java
index 31b97c9d9..af046ba08 100644
--- a/source/net/yacy/kelondro/data/citation/CitationReferenceRow.java
+++ b/source/net/yacy/kelondro/data/citation/CitationReferenceRow.java
@@ -4,7 +4,7 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2009-03-20 16:44:59 +0100 (Fr, 20 Mrz 2009) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
diff --git a/source/net/yacy/kelondro/data/image/ImageReference.java b/source/net/yacy/kelondro/data/image/ImageReference.java
index 97305b71a..30a09fbb4 100644
--- a/source/net/yacy/kelondro/data/image/ImageReference.java
+++ b/source/net/yacy/kelondro/data/image/ImageReference.java
@@ -4,9 +4,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2009-04-03 15:23:45 +0200 (Fr, 03 Apr 2009) $
-// $LastChangedRevision: 5777 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/net/yacy/kelondro/data/image/ImageReferenceFactory.java b/source/net/yacy/kelondro/data/image/ImageReferenceFactory.java
index 109df4ac3..7564f7c67 100644
--- a/source/net/yacy/kelondro/data/image/ImageReferenceFactory.java
+++ b/source/net/yacy/kelondro/data/image/ImageReferenceFactory.java
@@ -4,9 +4,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2009-04-03 15:23:45 +0200 (Fr, 03 Apr 2009) $
-// $LastChangedRevision: 5777 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/net/yacy/kelondro/data/image/ImageReferenceRow.java b/source/net/yacy/kelondro/data/image/ImageReferenceRow.java
index a8b3e4e17..99d2cc52c 100644
--- a/source/net/yacy/kelondro/data/image/ImageReferenceRow.java
+++ b/source/net/yacy/kelondro/data/image/ImageReferenceRow.java
@@ -4,9 +4,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2009-03-20 16:44:59 +0100 (Fr, 20 Mrz 2009) $
-// $LastChangedRevision: 5736 $
-// $LastChangedBy: borg-0300 $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
@@ -195,6 +195,7 @@ public final class ImageReferenceRow extends AbstractReference implements /*Imag
this.entry = rentry;
}
+ @Override
public ImageReferenceRow clone() {
final byte[] b = new byte[urlEntryRow.objectsize];
System.arraycopy(entry.bytes(), 0, b, 0, urlEntryRow.objectsize);
@@ -263,6 +264,7 @@ public final class ImageReferenceRow extends AbstractReference implements /*Imag
return new Bitfield(this.entry.getColBytes(col_flags, true));
}
+ @Override
public String toString() {
return toPropertyForm();
}
@@ -273,6 +275,7 @@ public final class ImageReferenceRow extends AbstractReference implements /*Imag
return false;
}
+ @Override
public int hashCode() {
return ByteArray.hashCode(this.metadataHash());
}
diff --git a/source/net/yacy/kelondro/data/image/ImageReferenceVars.java b/source/net/yacy/kelondro/data/image/ImageReferenceVars.java
index 90a6c7758..3a2007ac4 100644
--- a/source/net/yacy/kelondro/data/image/ImageReferenceVars.java
+++ b/source/net/yacy/kelondro/data/image/ImageReferenceVars.java
@@ -4,9 +4,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2009-03-20 16:44:59 +0100 (Fr, 20 Mrz 2009) $
-// $LastChangedRevision: 5736 $
-// $LastChangedBy: borg-0300 $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
@@ -149,6 +149,7 @@ public class ImageReferenceVars extends AbstractReference implements ImageRefere
this.termFrequency = 0.0;
}
+ @Override
public ImageReferenceVars clone() {
final ImageReferenceVars c = new ImageReferenceVars(
this.urlHash,
@@ -353,6 +354,7 @@ public class ImageReferenceVars extends AbstractReference implements ImageRefere
this.wordsintext = this.wordsintext + oe.wordsintext();
}
+ @Override
public int hashCode() {
return ByteArray.hashCode(this.urlHash);
}
diff --git a/source/net/yacy/kelondro/data/meta/DigestURI.java b/source/net/yacy/kelondro/data/meta/DigestURI.java
index aae8ad63a..cbab5aaf0 100644
--- a/source/net/yacy/kelondro/data/meta/DigestURI.java
+++ b/source/net/yacy/kelondro/data/meta/DigestURI.java
@@ -1,8 +1,8 @@
-// yacyURL.java
+// DigestURI.java
// (C) 2006 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 13.07.2006 on http://yacy.net
//
-// $LastChangedDate: 2009-10-10 01:22:22 +0200 (Sa, 10 Okt 2009) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
@@ -316,6 +316,7 @@ public class DigestURI extends MultiProtocolURI implements Serializable {
/**
* checks for local/global IP range and local IP
*/
+ @Override
public final boolean isLocal() {
if (this.isFile()) return true;
if (this.hash == null) synchronized (this) {
diff --git a/source/net/yacy/kelondro/data/meta/URIMetadata.java b/source/net/yacy/kelondro/data/meta/URIMetadata.java
index e96b84950..827628c39 100644
--- a/source/net/yacy/kelondro/data/meta/URIMetadata.java
+++ b/source/net/yacy/kelondro/data/meta/URIMetadata.java
@@ -1,10 +1,10 @@
-// Metadata.java
+// URIMetadata.java
// (C) 2009 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 03.04.2009 on http://yacy.net
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2009-03-20 16:44:59 +0100 (Fr, 20 Mrz 2009) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
diff --git a/source/net/yacy/kelondro/data/meta/URIMetadataRow.java b/source/net/yacy/kelondro/data/meta/URIMetadataRow.java
index 334a6fc43..da4b42fad 100644
--- a/source/net/yacy/kelondro/data/meta/URIMetadataRow.java
+++ b/source/net/yacy/kelondro/data/meta/URIMetadataRow.java
@@ -1,10 +1,10 @@
-// URLMetadata.java
+// URLMetadataRow.java
// (C) 2006 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 2006 on http://www.anomic.de
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2009-03-20 16:44:59 +0100 (Fr, 20 Mrz 2009) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
diff --git a/source/net/yacy/kelondro/data/navigation/NavigationReference.java b/source/net/yacy/kelondro/data/navigation/NavigationReference.java
index 6d0653ebc..77927e98c 100644
--- a/source/net/yacy/kelondro/data/navigation/NavigationReference.java
+++ b/source/net/yacy/kelondro/data/navigation/NavigationReference.java
@@ -4,7 +4,7 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2009-04-03 15:23:45 +0200 (Fr, 03 Apr 2009) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
diff --git a/source/net/yacy/kelondro/data/navigation/NavigationReferenceFactory.java b/source/net/yacy/kelondro/data/navigation/NavigationReferenceFactory.java
index 3b0fa8843..8359dfb1e 100644
--- a/source/net/yacy/kelondro/data/navigation/NavigationReferenceFactory.java
+++ b/source/net/yacy/kelondro/data/navigation/NavigationReferenceFactory.java
@@ -4,7 +4,7 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2009-04-03 15:23:45 +0200 (Fr, 03 Apr 2009) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
diff --git a/source/net/yacy/kelondro/data/navigation/NavigationReferenceRow.java b/source/net/yacy/kelondro/data/navigation/NavigationReferenceRow.java
index 9c0edbd33..f3a52a488 100644
--- a/source/net/yacy/kelondro/data/navigation/NavigationReferenceRow.java
+++ b/source/net/yacy/kelondro/data/navigation/NavigationReferenceRow.java
@@ -4,7 +4,7 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2009-03-20 16:44:59 +0100 (Fr, 20 Mrz 2009) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
diff --git a/source/net/yacy/kelondro/data/navigation/NavigationReferenceVars.java b/source/net/yacy/kelondro/data/navigation/NavigationReferenceVars.java
index 73ab9ba40..f245e603d 100644
--- a/source/net/yacy/kelondro/data/navigation/NavigationReferenceVars.java
+++ b/source/net/yacy/kelondro/data/navigation/NavigationReferenceVars.java
@@ -4,7 +4,7 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2009-03-20 16:44:59 +0100 (Fr, 20 Mrz 2009) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
diff --git a/source/net/yacy/kelondro/data/word/Word.java b/source/net/yacy/kelondro/data/word/Word.java
index 1db7ec555..c5bb43d81 100644
--- a/source/net/yacy/kelondro/data/word/Word.java
+++ b/source/net/yacy/kelondro/data/word/Word.java
@@ -4,7 +4,7 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2009-10-10 03:14:19 +0200 (Sa, 10 Okt 2009) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
diff --git a/source/net/yacy/kelondro/data/word/WordReference.java b/source/net/yacy/kelondro/data/word/WordReference.java
index 78546c8aa..bbb0d5287 100644
--- a/source/net/yacy/kelondro/data/word/WordReference.java
+++ b/source/net/yacy/kelondro/data/word/WordReference.java
@@ -4,7 +4,7 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2009-04-03 15:23:45 +0200 (Fr, 03 Apr 2009) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
diff --git a/source/net/yacy/kelondro/data/word/WordReferenceFactory.java b/source/net/yacy/kelondro/data/word/WordReferenceFactory.java
index 2015648a5..a01d3ce5a 100644
--- a/source/net/yacy/kelondro/data/word/WordReferenceFactory.java
+++ b/source/net/yacy/kelondro/data/word/WordReferenceFactory.java
@@ -4,7 +4,7 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2009-04-03 15:23:45 +0200 (Fr, 03 Apr 2009) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
diff --git a/source/net/yacy/kelondro/data/word/WordReferenceRow.java b/source/net/yacy/kelondro/data/word/WordReferenceRow.java
index b2df23999..2efb0eaba 100644
--- a/source/net/yacy/kelondro/data/word/WordReferenceRow.java
+++ b/source/net/yacy/kelondro/data/word/WordReferenceRow.java
@@ -1,10 +1,10 @@
-// ReferenceRow.java
+// WordReferenceRow.java
// (C) 2006 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 20.05.2006 on http://yacy.net
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2009-03-20 16:44:59 +0100 (Fr, 20 Mrz 2009) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
diff --git a/source/net/yacy/kelondro/data/word/WordReferenceVars.java b/source/net/yacy/kelondro/data/word/WordReferenceVars.java
index a7a7f55f1..60fe4dda4 100644
--- a/source/net/yacy/kelondro/data/word/WordReferenceVars.java
+++ b/source/net/yacy/kelondro/data/word/WordReferenceVars.java
@@ -1,10 +1,10 @@
-// ReferenceVars.java
+// WordReferenceVars.java
// (C) 2007 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 07.11.2007 on http://yacy.net
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2009-03-20 16:44:59 +0100 (Fr, 20 Mrz 2009) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
@@ -253,7 +253,7 @@ public class WordReferenceVars extends AbstractReference implements WordReferenc
hitcount, // how often appears this word in the text
wordsintext, // total number of words
phrasesintext, // total number of phrases
- positions.size() == 0 ? 1 : positions.iterator().next(), // position of word in all words
+ positions.isEmpty() ? 1 : positions.iterator().next(), // position of word in all words
posinphrase, // position of word in its phrase
posofphrase, // number of the phrase where word appears
lastModified, // last-modified time of the document where word appears
diff --git a/source/net/yacy/kelondro/index/BinSearch.java b/source/net/yacy/kelondro/index/BinSearch.java
index af5ebb5ed..779c3decf 100644
--- a/source/net/yacy/kelondro/index/BinSearch.java
+++ b/source/net/yacy/kelondro/index/BinSearch.java
@@ -6,9 +6,9 @@
// Frankfurt, Germany, 2005
// created 22.11.2005
//
-// $LastChangedDate: 2005-09-22 22:01:26 +0200 (Thu, 22 Sep 2005) $
-// $LastChangedRevision: 774 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/source/net/yacy/kelondro/index/BufferedObjectIndex.java b/source/net/yacy/kelondro/index/BufferedObjectIndex.java
index 8da9012b6..0088c1f4e 100644
--- a/source/net/yacy/kelondro/index/BufferedObjectIndex.java
+++ b/source/net/yacy/kelondro/index/BufferedObjectIndex.java
@@ -3,9 +3,9 @@
* Copyright 2010 by Michael Peter Christen
* First released 18.4.2010 at http://yacy.net
*
- * $LastChangedDate: 2010-06-16 17:11:21 +0200 (Mi, 16 Jun 2010) $
- * $LastChangedRevision: 6922 $
- * $LastChangedBy: orbiter $
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -179,7 +179,7 @@ public class BufferedObjectIndex implements Index, Iterable<Row.Entry> {
}
}
- public ArrayList<RowCollection> removeDoubles() throws IOException, RowSpaceExceededException {
+ public List<RowCollection> removeDoubles() throws IOException, RowSpaceExceededException {
synchronized (this.backend) {
flushBuffer();
return this.backend.removeDoubles();
diff --git a/source/net/yacy/kelondro/index/Cache.java b/source/net/yacy/kelondro/index/Cache.java
index e91a831de..fff5d45d4 100644
--- a/source/net/yacy/kelondro/index/Cache.java
+++ b/source/net/yacy/kelondro/index/Cache.java
@@ -3,9 +3,9 @@
* Copyright 2006 by Michael Peter Christen
* First released 26.10.2006 at http://yacy.net
*
- * $LastChangedDate: 2010-06-16 17:11:21 +0200 (Mi, 16 Jun 2010) $
- * $LastChangedRevision: 6922 $
- * $LastChangedBy: orbiter $
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -25,7 +25,6 @@
package net.yacy.kelondro.index;
import java.io.IOException;
-import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
@@ -451,7 +450,7 @@ public final class Cache implements Index, Iterable<Row.Entry> {
}
}
- public final synchronized ArrayList<RowCollection> removeDoubles() throws IOException, RowSpaceExceededException {
+ public final synchronized List<RowCollection> removeDoubles() throws IOException, RowSpaceExceededException {
return index.removeDoubles();
// todo: remove reported entries from the cache!!!
}
diff --git a/source/net/yacy/kelondro/index/Column.java b/source/net/yacy/kelondro/index/Column.java
index 76c272df3..320582821 100644
--- a/source/net/yacy/kelondro/index/Column.java
+++ b/source/net/yacy/kelondro/index/Column.java
@@ -5,9 +5,9 @@
// This is a part of the kelondro database,
// which is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
-// $LastChangedRevision: 1986 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
@@ -192,6 +192,7 @@ public final class Column {
}
}
+ @Override
public final String toString() {
final StringBuilder s = new StringBuilder();
switch (celltype) {
diff --git a/source/net/yacy/kelondro/index/HandleMap.java b/source/net/yacy/kelondro/index/HandleMap.java
index 3db2588f9..30f402cb3 100644
--- a/source/net/yacy/kelondro/index/HandleMap.java
+++ b/source/net/yacy/kelondro/index/HandleMap.java
@@ -3,9 +3,9 @@
* Copyright 2008 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
* First released 08.04.2008 at http://yacy.net
*
- * $LastChangedDate: 2010-06-16 17:11:21 +0200 (Mi, 16 Jun 2010) $
- * $LastChangedRevision: 6922 $
- * $LastChangedBy: orbiter $
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/source/net/yacy/kelondro/index/HandleSet.java b/source/net/yacy/kelondro/index/HandleSet.java
index 921a74473..ce11fbc6d 100644
--- a/source/net/yacy/kelondro/index/HandleSet.java
+++ b/source/net/yacy/kelondro/index/HandleSet.java
@@ -2,9 +2,9 @@
// (C) 2009 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 10.03.2009 on http://www.anomic.de
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
-// $LastChangedRevision: 1986 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
@@ -69,6 +69,7 @@ public final class HandleSet implements Iterable<byte[]>, Cloneable {
this.index = RowSet.importRowSet(b, this.rowdef);
}
+ @Override
public HandleSet clone() {
return new HandleSet(this.rowdef, this.index.clone());
}
@@ -225,6 +226,7 @@ public final class HandleSet implements Iterable<byte[]>, Cloneable {
index = null;
}
+ @Override
public final String toString() {
return this.index.toString();
}
diff --git a/source/net/yacy/kelondro/index/Index.java b/source/net/yacy/kelondro/index/Index.java
index 7483f2e5a..85fcf6283 100644
--- a/source/net/yacy/kelondro/index/Index.java
+++ b/source/net/yacy/kelondro/index/Index.java
@@ -3,9 +3,9 @@
* Copyright 2005 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
* First released 26.10.2005 at http://yacy.net
*
- * $LastChangedDate: 2010-06-16 17:11:21 +0200 (Mi, 16 Jun 2010) $
- * $LastChangedRevision: 6922 $
- * $LastChangedBy: orbiter $
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -25,7 +25,6 @@
package net.yacy.kelondro.index;
import java.io.IOException;
-import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
@@ -54,7 +53,7 @@ public interface Index extends Iterable<Row.Entry> {
*/
public boolean put(Row.Entry row) throws IOException, RowSpaceExceededException;
public void addUnique(Row.Entry row) throws RowSpaceExceededException, IOException; // no double-check
- public ArrayList<RowCollection> removeDoubles() throws IOException, RowSpaceExceededException; // removes all elements that are double (to be used after all addUnique)
+ public List<RowCollection> removeDoubles() throws IOException, RowSpaceExceededException; // removes all elements that are double (to be used after all addUnique)
public boolean delete(byte[] key) throws IOException;
public Row.Entry remove(byte[] key) throws IOException;
public Row.Entry removeOne() throws IOException;
diff --git a/source/net/yacy/kelondro/index/IndexTest.java b/source/net/yacy/kelondro/index/IndexTest.java
index de86b5fba..c431509a5 100644
--- a/source/net/yacy/kelondro/index/IndexTest.java
+++ b/source/net/yacy/kelondro/index/IndexTest.java
@@ -5,9 +5,9 @@
// This is a part of the kelondro database,
// which is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
-// $LastChangedRevision: 1986 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/net/yacy/kelondro/index/RAMIndex.java b/source/net/yacy/kelondro/index/RAMIndex.java
index f24bd01d0..855f11efc 100644
--- a/source/net/yacy/kelondro/index/RAMIndex.java
+++ b/source/net/yacy/kelondro/index/RAMIndex.java
@@ -3,9 +3,9 @@
* Copyright 2008 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
* First released 07.01.2008 at http://yacy.net
*
- * $LastChangedDate: 2010-06-16 17:11:21 +0200 (Mi, 16 Jun 2010) $
- * $LastChangedRevision: 6922 $
- * $LastChangedBy: orbiter $
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -70,6 +70,7 @@ public final class RAMIndex implements Index, Iterable<Row.Entry> {
return objectTracker.entrySet().iterator();
}
+ @Override
public RAMIndex clone() {
return new RAMIndex(this.name + ".clone", this.rowdef, index0.clone(), index1.clone(), entryComparator);
}
diff --git a/source/net/yacy/kelondro/index/RAMIndexCluster.java b/source/net/yacy/kelondro/index/RAMIndexCluster.java
index e6fcfc7c4..76c50f115 100644
--- a/source/net/yacy/kelondro/index/RAMIndexCluster.java
+++ b/source/net/yacy/kelondro/index/RAMIndexCluster.java
@@ -3,9 +3,9 @@
* Copyright 2009 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
* First released 12.03.2009 at http://yacy.net
*
- * $LastChangedDate: 2010-06-16 17:11:21 +0200 (Mi, 16 Jun 2010) $
- * $LastChangedRevision: 6922 $
- * $LastChangedBy: orbiter $
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -63,6 +63,7 @@ public final class RAMIndexCluster implements Index, Iterable<Row.Entry>, Clonea
for (RAMIndex i: this.cluster) if (i != null) i.trim();
}
+ @Override
public RAMIndexCluster clone() {
RAMIndex[] a = new RAMIndex[this.cluster.length];
for (int i = 0; i < this.cluster.length; i++) {
diff --git a/source/net/yacy/kelondro/index/Row.java b/source/net/yacy/kelondro/index/Row.java
index 2448dc258..8309841b4 100644
--- a/source/net/yacy/kelondro/index/Row.java
+++ b/source/net/yacy/kelondro/index/Row.java
@@ -5,9 +5,9 @@
// This is a part of the kelondro database,
// which is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
-// $LastChangedRevision: 1986 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
@@ -134,6 +134,7 @@ public final class Row {
return w;
}
+ @Override
public final String toString() {
final StringBuilder s = new StringBuilder();
s.append(row[0].toString());
@@ -339,6 +340,7 @@ public final class Row {
}
// compare the content of the primary key
+ @Override
public boolean equals(final Object obj) {
if (this == obj) return true;
if (obj == null) return false;
@@ -352,6 +354,7 @@ public final class Row {
return true;
}
+ @Override
public int hashCode() {
final byte[] b = this.getPrimaryKeyBytes();
final int len = b.length;
@@ -595,6 +598,7 @@ public final class Row {
return bb.toString();
}
+ @Override
public final String toString() {
return toPropertyForm(true, false, false);
}
@@ -684,6 +688,7 @@ public final class Row {
return true;
}
+ @Override
public boolean equals(final Object obj) {
if (this == obj) return true;
if (obj == null) return false;
@@ -697,6 +702,7 @@ public final class Row {
return true;
}
+ @Override
public int hashCode() {
return this.toString().hashCode();
}
diff --git a/source/net/yacy/kelondro/index/RowCollection.java b/source/net/yacy/kelondro/index/RowCollection.java
index 3c416e91b..4f22b0221 100644
--- a/source/net/yacy/kelondro/index/RowCollection.java
+++ b/source/net/yacy/kelondro/index/RowCollection.java
@@ -2,9 +2,9 @@
// (C) 2006 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 12.01.2006 on http://www.anomic.de
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
-// $LastChangedRevision: 1986 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/net/yacy/kelondro/index/RowSpaceExceededException.java b/source/net/yacy/kelondro/index/RowSpaceExceededException.java
index f8bd12de7..5d741d1cf 100644
--- a/source/net/yacy/kelondro/index/RowSpaceExceededException.java
+++ b/source/net/yacy/kelondro/index/RowSpaceExceededException.java
@@ -4,9 +4,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
-// $LastChangedRevision: 1986 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/net/yacy/kelondro/io/AbstractReader.java b/source/net/yacy/kelondro/io/AbstractReader.java
index 8ee50b9b9..fdd81694e 100644
--- a/source/net/yacy/kelondro/io/AbstractReader.java
+++ b/source/net/yacy/kelondro/io/AbstractReader.java
@@ -1,12 +1,12 @@
-// AbstractRandomAccessWriter.java
+// AbstractReader.java
// -------------------------------
// (C) 2009 by Michael Peter Christen; [email protected]
// first published on http://www.anomic.de
// Frankfurt, Germany, 09.09.2009
//
-// $LastChangedDate: 2009-01-30 15:48:11 +0100 (Fr, 30 Jan 2009) $
-// $LastChangedRevision: 5539 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/source/net/yacy/kelondro/io/AbstractWriter.java b/source/net/yacy/kelondro/io/AbstractWriter.java
index 7302d1b36..480e9a30d 100644
--- a/source/net/yacy/kelondro/io/AbstractWriter.java
+++ b/source/net/yacy/kelondro/io/AbstractWriter.java
@@ -1,12 +1,12 @@
-// AbstractRandomAccessWriter.java
+// AbstractWriter.java
// -------------------------------
// (C) 2004 by Michael Peter Christen; [email protected]
// first published on http://www.anomic.de
// Frankfurt, Germany, 2004
//
-// $LastChangedDate: 2009-01-30 15:48:11 +0100 (Fr, 30 Jan 2009) $
-// $LastChangedRevision: 5539 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/source/net/yacy/kelondro/io/BufferedRecords.java b/source/net/yacy/kelondro/io/BufferedRecords.java
index fca3e59f0..b06b1fa3d 100644
--- a/source/net/yacy/kelondro/io/BufferedRecords.java
+++ b/source/net/yacy/kelondro/io/BufferedRecords.java
@@ -2,9 +2,9 @@
// (C) 2008 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 14.01.2008 on http://yacy.net
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
-// $LastChangedRevision: 1986 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
@@ -88,6 +88,7 @@ public final class BufferedRecords {
if (efs != null) efs.close();
}
+ @Override
protected final synchronized void finalize() {
if (this.efs != null) this.close();
}
diff --git a/source/net/yacy/kelondro/io/ByteCount.java b/source/net/yacy/kelondro/io/ByteCount.java
index 79b100c3c..ca883df3f 100644
--- a/source/net/yacy/kelondro/io/ByteCount.java
+++ b/source/net/yacy/kelondro/io/ByteCount.java
@@ -5,8 +5,8 @@
//Frankfurt, Germany, 2004
//
// This file is contributed by Sebastian Gäbel
-// last major change: $LastChangedDate: 2010-04-23 11:32:29 +0200 (Fr, 23. Apr 2010) $ by $LastChangedBy: sixcooler $
-// Revision: $LastChangedRevision: 6835 $
+// last major change: $LastChangedDate$ by $LastChangedBy$
+// Revision: $LastChangedRevision$
//
//This program is free software; you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
diff --git a/source/net/yacy/kelondro/io/CachedFileReader.java b/source/net/yacy/kelondro/io/CachedFileReader.java
index 3a26beb9e..142b6cddf 100644
--- a/source/net/yacy/kelondro/io/CachedFileReader.java
+++ b/source/net/yacy/kelondro/io/CachedFileReader.java
@@ -84,6 +84,7 @@ public final class CachedFileReader extends AbstractReader implements Reader {
this.cache = null;
}
+ @Override
protected void finalize() throws Throwable {
this.close();
super.finalize();
diff --git a/source/net/yacy/kelondro/io/CachedFileWriter.java b/source/net/yacy/kelondro/io/CachedFileWriter.java
index ca6711b2a..4b09953df 100644
--- a/source/net/yacy/kelondro/io/CachedFileWriter.java
+++ b/source/net/yacy/kelondro/io/CachedFileWriter.java
@@ -1,10 +1,13 @@
-// CachedRandomAccessFileWriter.java
+// CachedFileWriter.java
// ---------------------------------
// part of The Kelondro Database
// (C) by Michael Peter Christen; [email protected]
// first published on http://yacy.net
-// Frankfurt, Germany, 2004-2008
-// last major change: 09.12.2008
+// Frankfurt, Germany, 2004-2008s
+//
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -158,6 +161,7 @@ public final class CachedFileWriter extends AbstractWriter implements Writer {
this.cachelen = 0;
}
+ @Override
protected final void finalize() throws Throwable {
this.close();
super.finalize();
diff --git a/source/net/yacy/kelondro/io/CachedRecords.java b/source/net/yacy/kelondro/io/CachedRecords.java
index 62da1747b..71bdc636f 100644
--- a/source/net/yacy/kelondro/io/CachedRecords.java
+++ b/source/net/yacy/kelondro/io/CachedRecords.java
@@ -1,10 +1,10 @@
-// Records.java
+// CachedRecords.java
// (C) 2008 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 14.01.2008 on http://yacy.net
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
-// $LastChangedRevision: 1986 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/net/yacy/kelondro/io/Reader.java b/source/net/yacy/kelondro/io/Reader.java
index 6b71937f3..645cd1c6d 100644
--- a/source/net/yacy/kelondro/io/Reader.java
+++ b/source/net/yacy/kelondro/io/Reader.java
@@ -1,9 +1,13 @@
-// RandomAccessReader.java
+// Reader.java
// -----------------------
// (C) 2009 by Michael Peter Christen; [email protected]
// first published on http://yacy.net
// Frankfurt, Germany, 09.09.2009
//
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
+//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
diff --git a/source/net/yacy/kelondro/io/Records.java b/source/net/yacy/kelondro/io/Records.java
index 46c285888..ad5abc60c 100644
--- a/source/net/yacy/kelondro/io/Records.java
+++ b/source/net/yacy/kelondro/io/Records.java
@@ -2,9 +2,9 @@
// (C) 2008 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 14.01.2008 on http://yacy.net
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
-// $LastChangedRevision: 1986 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/net/yacy/kelondro/io/Writer.java b/source/net/yacy/kelondro/io/Writer.java
index 2c66e7f77..c58ce51c5 100644
--- a/source/net/yacy/kelondro/io/Writer.java
+++ b/source/net/yacy/kelondro/io/Writer.java
@@ -1,4 +1,4 @@
-// RandomAccessWriter.java
+// Writer.java
// -----------------------
// (C) 2004 by Michael Peter Christen; [email protected]
// first published on http://www.anomic.de
diff --git a/source/net/yacy/kelondro/order/AbstractOrder.java b/source/net/yacy/kelondro/order/AbstractOrder.java
index c80779a3d..19839565f 100644
--- a/source/net/yacy/kelondro/order/AbstractOrder.java
+++ b/source/net/yacy/kelondro/order/AbstractOrder.java
@@ -6,7 +6,7 @@
// Frankfurt, Germany, 2005
// created 29.12.2005
//
-// $LastChangedDate: 2005-09-22 22:01:26 +0200 (Thu, 22 Sep 2005) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
@@ -52,6 +52,7 @@ public abstract class AbstractOrder<A> implements Order<A> {
}
@SuppressWarnings("unchecked")
+ @Override
public boolean equals(final Object obj) {
if (this == obj) return true;
if (obj == null) return false;
@@ -63,6 +64,7 @@ public abstract class AbstractOrder<A> implements Order<A> {
return thisSig.equals(otherSig);
}
+ @Override
public int hashCode() {
return this.signature().hashCode();
}
diff --git a/source/net/yacy/kelondro/order/Base64Order.java b/source/net/yacy/kelondro/order/Base64Order.java
index 599349b1c..929c58dea 100644
--- a/source/net/yacy/kelondro/order/Base64Order.java
+++ b/source/net/yacy/kelondro/order/Base64Order.java
@@ -6,7 +6,7 @@
// Frankfurt, Germany, 2005
// created 03.01.2006
//
-// $LastChangedDate: 2009-01-30 15:48:11 +0100 (Fr, 30 Jan 2009) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
diff --git a/source/net/yacy/kelondro/order/Bitfield.java b/source/net/yacy/kelondro/order/Bitfield.java
index 3acceb21a..f338bd3c0 100644
--- a/source/net/yacy/kelondro/order/Bitfield.java
+++ b/source/net/yacy/kelondro/order/Bitfield.java
@@ -2,7 +2,7 @@
// (C) 2006 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 22.22.2006 on http://www.anomic.de
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
@@ -106,6 +106,7 @@ public class Bitfield implements Cloneable {
return sb.toString();
}
+ @Override
public boolean equals(final Object obj) {
if (this == obj) return true;
if (obj == null) return false;
@@ -116,6 +117,7 @@ public class Bitfield implements Cloneable {
return true;
}
+ @Override
public int hashCode() {
return this.toString().hashCode();
}
diff --git a/source/net/yacy/kelondro/order/ByteOrder.java b/source/net/yacy/kelondro/order/ByteOrder.java
index ab249fa13..4018a6810 100644
--- a/source/net/yacy/kelondro/order/ByteOrder.java
+++ b/source/net/yacy/kelondro/order/ByteOrder.java
@@ -5,7 +5,7 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
diff --git a/source/net/yacy/kelondro/order/CloneableIterator.java b/source/net/yacy/kelondro/order/CloneableIterator.java
index 6888e91e6..e51a86ad2 100644
--- a/source/net/yacy/kelondro/order/CloneableIterator.java
+++ b/source/net/yacy/kelondro/order/CloneableIterator.java
@@ -4,7 +4,7 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
diff --git a/source/net/yacy/kelondro/order/CloneableMapIterator.java b/source/net/yacy/kelondro/order/CloneableMapIterator.java
index 30d46b4f9..e9b2efbfc 100644
--- a/source/net/yacy/kelondro/order/CloneableMapIterator.java
+++ b/source/net/yacy/kelondro/order/CloneableMapIterator.java
@@ -4,7 +4,7 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
diff --git a/source/net/yacy/kelondro/order/Digest.java b/source/net/yacy/kelondro/order/Digest.java
index 6f86f276e..cbc9e72c6 100644
--- a/source/net/yacy/kelondro/order/Digest.java
+++ b/source/net/yacy/kelondro/order/Digest.java
@@ -4,7 +4,7 @@
// first published 28.12.2008 on http://yacy.net
// this uses methods that had been implemented in serverCodings
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
diff --git a/source/net/yacy/kelondro/order/MicroDate.java b/source/net/yacy/kelondro/order/MicroDate.java
index b164f0276..4bb179e97 100644
--- a/source/net/yacy/kelondro/order/MicroDate.java
+++ b/source/net/yacy/kelondro/order/MicroDate.java
@@ -4,7 +4,7 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
diff --git a/source/net/yacy/kelondro/order/NaturalOrder.java b/source/net/yacy/kelondro/order/NaturalOrder.java
index f7dedca81..88950f62b 100644
--- a/source/net/yacy/kelondro/order/NaturalOrder.java
+++ b/source/net/yacy/kelondro/order/NaturalOrder.java
@@ -6,7 +6,7 @@
// Frankfurt, Germany, 2005
// created 29.12.2005
//
-// $LastChangedDate: 2005-09-22 22:01:26 +0200 (Thu, 22 Sep 2005) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
diff --git a/source/net/yacy/kelondro/order/Order.java b/source/net/yacy/kelondro/order/Order.java
index b3fdad7a0..7b15f65d5 100644
--- a/source/net/yacy/kelondro/order/Order.java
+++ b/source/net/yacy/kelondro/order/Order.java
@@ -6,7 +6,7 @@
// Frankfurt, Germany, 2005
// created 29.12.2005
//
-// $LastChangedDate: 2005-09-22 22:01:26 +0200 (Thu, 22 Sep 2005) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
@@ -50,7 +50,9 @@ public interface Order<A> extends Comparator<A> {
public void rotate(A zero); // defines that the ordering rotates, and sets the zero point for the rotation
+ @Override
public boolean equals(Object o); // used to compare different order objects; they may define the same ordering
+ @Override
public int hashCode();
}
diff --git a/source/net/yacy/kelondro/order/RotateIterator.java b/source/net/yacy/kelondro/order/RotateIterator.java
index 57db45089..c16365e9f 100644
--- a/source/net/yacy/kelondro/order/RotateIterator.java
+++ b/source/net/yacy/kelondro/order/RotateIterator.java
@@ -4,7 +4,7 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
diff --git a/source/net/yacy/kelondro/order/StringOrder.java b/source/net/yacy/kelondro/order/StringOrder.java
index b55310a01..93049b205 100644
--- a/source/net/yacy/kelondro/order/StringOrder.java
+++ b/source/net/yacy/kelondro/order/StringOrder.java
@@ -5,9 +5,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
-// $LastChangedRevision: 1986 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/net/yacy/kelondro/rwi/AbstractBufferedIndex.java b/source/net/yacy/kelondro/rwi/AbstractBufferedIndex.java
index 3387053f3..8b05a9bbd 100644
--- a/source/net/yacy/kelondro/rwi/AbstractBufferedIndex.java
+++ b/source/net/yacy/kelondro/rwi/AbstractBufferedIndex.java
@@ -5,9 +5,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
-// $LastChangedRevision: 1986 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/net/yacy/kelondro/rwi/AbstractIndex.java b/source/net/yacy/kelondro/rwi/AbstractIndex.java
index c1cf154ea..ba710503b 100644
--- a/source/net/yacy/kelondro/rwi/AbstractIndex.java
+++ b/source/net/yacy/kelondro/rwi/AbstractIndex.java
@@ -5,9 +5,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
-// $LastChangedRevision: 1986 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/net/yacy/kelondro/rwi/AbstractReference.java b/source/net/yacy/kelondro/rwi/AbstractReference.java
index 83ea4c982..74b37ffc4 100644
--- a/source/net/yacy/kelondro/rwi/AbstractReference.java
+++ b/source/net/yacy/kelondro/rwi/AbstractReference.java
@@ -4,9 +4,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2009-04-07 11:34:41 +0200 (Di, 07 Apr 2009) $
-// $LastChangedRevision: 5783 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/net/yacy/kelondro/rwi/BufferedIndex.java b/source/net/yacy/kelondro/rwi/BufferedIndex.java
index cefc5f0a4..c5843c2c9 100644
--- a/source/net/yacy/kelondro/rwi/BufferedIndex.java
+++ b/source/net/yacy/kelondro/rwi/BufferedIndex.java
@@ -5,9 +5,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
-// $LastChangedRevision: 1986 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/net/yacy/kelondro/rwi/IODispatcher.java b/source/net/yacy/kelondro/rwi/IODispatcher.java
index dafffe3b4..c38a865ec 100644
--- a/source/net/yacy/kelondro/rwi/IODispatcher.java
+++ b/source/net/yacy/kelondro/rwi/IODispatcher.java
@@ -1,10 +1,10 @@
-// IODespatcher.java
+// IODispatcher.java
// (C) 2009 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 20.03.2009 on http://yacy.net
//
-// $LastChangedDate: 2009-10-10 01:32:08 +0200 (Sa, 10 Okt 2009) $
-// $LastChangedRevision: 6393 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
@@ -141,6 +141,7 @@ public class IODispatcher extends Thread {
}
}
+ @Override
public void run() {
MergeJob mergeJob;
DumpJob<? extends Reference> dumpJob;
diff --git a/source/net/yacy/kelondro/rwi/Index.java b/source/net/yacy/kelondro/rwi/Index.java
index badda8a1f..85c18f2f9 100644
--- a/source/net/yacy/kelondro/rwi/Index.java
+++ b/source/net/yacy/kelondro/rwi/Index.java
@@ -5,9 +5,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2009-10-10 01:22:22 +0200 (Sa, 10 Okt 2009) $
-// $LastChangedRevision: 6392 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/net/yacy/kelondro/rwi/IndexCell.java b/source/net/yacy/kelondro/rwi/IndexCell.java
index 46db6c440..dfa5d9207 100644
--- a/source/net/yacy/kelondro/rwi/IndexCell.java
+++ b/source/net/yacy/kelondro/rwi/IndexCell.java
@@ -1,12 +1,12 @@
-// ReverseIndexCell.java
+// IndexCell.java
// (C) 2009 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 1.3.2009 on http://yacy.net
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2009-10-10 01:32:08 +0200 (Sa, 10 Okt 2009) $
-// $LastChangedRevision: 6393 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/net/yacy/kelondro/rwi/IndexReader.java b/source/net/yacy/kelondro/rwi/IndexReader.java
index 8f440f004..0b9c8697e 100644
--- a/source/net/yacy/kelondro/rwi/IndexReader.java
+++ b/source/net/yacy/kelondro/rwi/IndexReader.java
@@ -4,9 +4,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2009-10-10 01:22:22 +0200 (Sa, 10 Okt 2009) $
-// $LastChangedRevision: 6392 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/net/yacy/kelondro/rwi/Reference.java b/source/net/yacy/kelondro/rwi/Reference.java
index bf41f4c92..8293b5fce 100644
--- a/source/net/yacy/kelondro/rwi/Reference.java
+++ b/source/net/yacy/kelondro/rwi/Reference.java
@@ -4,9 +4,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2009-10-10 01:32:08 +0200 (Sa, 10 Okt 2009) $
-// $LastChangedRevision: 6393 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
@@ -40,12 +40,15 @@ public interface Reference {
public long lastModified();
+ @Override
public String toString();
public boolean isOlder(Reference other);
+ @Override
public int hashCode();
+ @Override
public boolean equals(Object other);
public void join(final Reference oe);
diff --git a/source/net/yacy/kelondro/rwi/ReferenceContainer.java b/source/net/yacy/kelondro/rwi/ReferenceContainer.java
index 1cc941d7e..1455d25b3 100644
--- a/source/net/yacy/kelondro/rwi/ReferenceContainer.java
+++ b/source/net/yacy/kelondro/rwi/ReferenceContainer.java
@@ -4,9 +4,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2009-10-10 01:32:08 +0200 (Sa, 10 Okt 2009) $
-// $LastChangedRevision: 6393 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/net/yacy/kelondro/rwi/ReferenceContainerArray.java b/source/net/yacy/kelondro/rwi/ReferenceContainerArray.java
index 9e0381ad5..09c9aeda3 100644
--- a/source/net/yacy/kelondro/rwi/ReferenceContainerArray.java
+++ b/source/net/yacy/kelondro/rwi/ReferenceContainerArray.java
@@ -2,9 +2,9 @@
// (C) 2009 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 04.01.2009 on http://yacy.net
//
-// $LastChangedDate: 2009-10-10 01:32:08 +0200 (Sa, 10 Okt 2009) $
-// $LastChangedRevision: 6393 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/net/yacy/kelondro/rwi/ReferenceContainerCache.java b/source/net/yacy/kelondro/rwi/ReferenceContainerCache.java
index 4772f7db7..305bbd89c 100644
--- a/source/net/yacy/kelondro/rwi/ReferenceContainerCache.java
+++ b/source/net/yacy/kelondro/rwi/ReferenceContainerCache.java
@@ -4,9 +4,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2009-10-10 01:32:08 +0200 (Sa, 10 Okt 2009) $
-// $LastChangedRevision: 6393 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
@@ -32,6 +32,7 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Iterator;
+import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
@@ -114,7 +115,7 @@ public final class ReferenceContainerCache<ReferenceType extends Reference> exte
final long startTime = System.currentTimeMillis();
// sort the map
- ArrayList<ReferenceContainer<ReferenceType>> cachecopy = sortedClone();
+ List<ReferenceContainer<ReferenceType>> cachecopy = sortedClone();
// write wCache
long wordcount = 0, urlcount = 0;
@@ -156,8 +157,8 @@ public final class ReferenceContainerCache<ReferenceType extends Reference> exte
* create a clone of the cache content that is sorted using the this.containerOrder
* @return the sorted ReferenceContainer[]
*/
- protected ArrayList<ReferenceContainer<ReferenceType>> sortedClone() {
- ArrayList<ReferenceContainer<ReferenceType>> cachecopy = new ArrayList<ReferenceContainer<ReferenceType>>(cache.size());
+ protected List<ReferenceContainer<ReferenceType>> sortedClone() {
+ final List<ReferenceContainer<ReferenceType>> cachecopy = new ArrayList<ReferenceContainer<ReferenceType>>(cache.size());
synchronized (cache) {
for (final Map.Entry<ByteArray, ReferenceContainer<ReferenceType>> entry: cache.entrySet()) {
if (entry.getValue() != null && entry.getValue().getTermHash() != null) cachecopy.add(entry.getValue());
@@ -212,7 +213,7 @@ public final class ReferenceContainerCache<ReferenceType extends Reference> exte
// plus the mentioned features
private final boolean rot;
- private final ArrayList<ReferenceContainer<ReferenceType>> cachecopy;
+ private final List<ReferenceContainer<ReferenceType>> cachecopy;
private int p;
private byte[] latestTermHash;
@@ -256,7 +257,7 @@ public final class ReferenceContainerCache<ReferenceType extends Reference> exte
if (!rot) {
return null;
}
- if (this.cachecopy.size() == 0) return null;
+ if (this.cachecopy.isEmpty()) return null;
p = 0;
ReferenceContainer<ReferenceType> c = this.cachecopy.get(this.p++);
this.latestTermHash = c.getTermHash();
diff --git a/source/net/yacy/kelondro/rwi/ReferenceContainerOrder.java b/source/net/yacy/kelondro/rwi/ReferenceContainerOrder.java
index 4bdb9540c..e7bbd56f7 100644
--- a/source/net/yacy/kelondro/rwi/ReferenceContainerOrder.java
+++ b/source/net/yacy/kelondro/rwi/ReferenceContainerOrder.java
@@ -4,9 +4,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2009-10-10 01:22:22 +0200 (Sa, 10 Okt 2009) $
-// $LastChangedRevision: 6392 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
@@ -43,6 +43,7 @@ public class ReferenceContainerOrder<ReferenceType extends Reference> extends Ab
return embeddedOrder.wellformed(a.getTermHash());
}
+ @Override
public void direction(final boolean ascending) {
this.embeddedOrder.direction(ascending);
}
@@ -59,6 +60,7 @@ public class ReferenceContainerOrder<ReferenceType extends Reference> extends Ab
return this.embeddedOrder.equal(a.getTermHash(), b.getTermHash());
}
+ @Override
public void rotate(final ReferenceContainer<ReferenceType> zero) {
this.embeddedOrder.rotate(zero.getTermHash());
this.zero = new ReferenceContainer<ReferenceType>(this.factory, this.embeddedOrder.zero(), zero);
@@ -77,6 +79,7 @@ public class ReferenceContainerOrder<ReferenceType extends Reference> extends Ab
}
@SuppressWarnings("unchecked")
+ @Override
public boolean equals(final Object obj) {
if (this == obj) return true;
if (obj == null) return false;
diff --git a/source/net/yacy/kelondro/rwi/ReferenceFactory.java b/source/net/yacy/kelondro/rwi/ReferenceFactory.java
index 893e1adfd..5b158937c 100644
--- a/source/net/yacy/kelondro/rwi/ReferenceFactory.java
+++ b/source/net/yacy/kelondro/rwi/ReferenceFactory.java
@@ -4,9 +4,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2009-04-03 15:23:45 +0200 (Fr, 03 Apr 2009) $
-// $LastChangedRevision: 5777 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/net/yacy/kelondro/rwi/ReferenceIterator.java b/source/net/yacy/kelondro/rwi/ReferenceIterator.java
index 0415f330b..49615a82b 100644
--- a/source/net/yacy/kelondro/rwi/ReferenceIterator.java
+++ b/source/net/yacy/kelondro/rwi/ReferenceIterator.java
@@ -4,9 +4,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2009-10-10 01:32:08 +0200 (Sa, 10 Okt 2009) $
-// $LastChangedRevision: 6393 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/net/yacy/kelondro/rwi/TermSearch.java b/source/net/yacy/kelondro/rwi/TermSearch.java
index a7fce041e..2211536c9 100644
--- a/source/net/yacy/kelondro/rwi/TermSearch.java
+++ b/source/net/yacy/kelondro/rwi/TermSearch.java
@@ -5,9 +5,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
-// $LastChangedRevision: 1986 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/net/yacy/kelondro/table/ChunkIterator.java b/source/net/yacy/kelondro/table/ChunkIterator.java
index edc1d6a91..afdea51ed 100644
--- a/source/net/yacy/kelondro/table/ChunkIterator.java
+++ b/source/net/yacy/kelondro/table/ChunkIterator.java
@@ -1,10 +1,10 @@
-// kelondroChunkIterator.java
+// ChunkIterator.java
// (C) 2008 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 14.01.2008 on http://yacy.net
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
-// $LastChangedRevision: 1986 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/net/yacy/kelondro/table/Relations.java b/source/net/yacy/kelondro/table/Relations.java
index d5d03ec73..b9046e0d6 100755
--- a/source/net/yacy/kelondro/table/Relations.java
+++ b/source/net/yacy/kelondro/table/Relations.java
@@ -1,12 +1,12 @@
-// kelondroRelations.java
+// kRelations.java
// (C) 2008 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 3.07.2008 on http://yacy.net
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2008-03-14 01:16:04 +0100 (Fr, 14 Mrz 2008) $
-// $LastChangedRevision: 4558 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/net/yacy/kelondro/table/SQLTable.java b/source/net/yacy/kelondro/table/SQLTable.java
index a450ec1ee..cab0a8316 100644
--- a/source/net/yacy/kelondro/table/SQLTable.java
+++ b/source/net/yacy/kelondro/table/SQLTable.java
@@ -1,12 +1,12 @@
-// kelondroSQLTable.java
+// SQLTable.java
// this class was written by Martin Thelian
// (the class was once a sub-class of dbtest.java)
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
-// $LastChangedRevision: 1986 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/net/yacy/kelondro/table/SplitTable.java b/source/net/yacy/kelondro/table/SplitTable.java
index e69dc4f25..da6e2524f 100644
--- a/source/net/yacy/kelondro/table/SplitTable.java
+++ b/source/net/yacy/kelondro/table/SplitTable.java
@@ -1,12 +1,12 @@
-// kelondroSplitTable.java
+// SplitTable.java
// (C) 2006 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 12.10.2006 on http://www.anomic.de
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
-// $LastChangedRevision: 1986 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
@@ -396,9 +396,9 @@ public class SplitTable implements Index, Iterable<Row.Entry> {
table.addUnique(row);
}
- public ArrayList<RowCollection> removeDoubles() throws IOException, RowSpaceExceededException {
+ public List<RowCollection> removeDoubles() throws IOException, RowSpaceExceededException {
final Iterator<Index> i = tables.values().iterator();
- final ArrayList<RowCollection> report = new ArrayList<RowCollection>();
+ final List<RowCollection> report = new ArrayList<RowCollection>();
while (i.hasNext()) {
report.addAll(i.next().removeDoubles());
}
diff --git a/source/net/yacy/kelondro/table/Table.java b/source/net/yacy/kelondro/table/Table.java
index 60c114618..11c021ce9 100644
--- a/source/net/yacy/kelondro/table/Table.java
+++ b/source/net/yacy/kelondro/table/Table.java
@@ -2,9 +2,9 @@
// (C) 2008 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 14.01.2008 on http://yacy.net
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
-// $LastChangedRevision: 1986 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
@@ -375,17 +375,16 @@ public class Table implements Index, Iterable<Row.Entry> {
* and
* @throws
*/
- public synchronized ArrayList<RowCollection> removeDoubles() throws IOException, RowSpaceExceededException {
+ public synchronized List<RowCollection> removeDoubles() throws IOException, RowSpaceExceededException {
assert file.size() == index.size() : "file.size() = " + file.size() + ", index.size() = " + index.size();
- final ArrayList<RowCollection> report = new ArrayList<RowCollection>();
+ final List<RowCollection> report = new ArrayList<RowCollection>();
RowSet rows;
final TreeSet<Long> d = new TreeSet<Long>();
final byte[] b = new byte[rowdef.objectsize];
- long L;
Row.Entry inconsistentEntry;
// iterate over all entries that have inconsistent index references
long lastlog = System.currentTimeMillis();
- ArrayList<long[]> doubles;
+ List<long[]> doubles;
try {
doubles = index.removeDoubles();
} catch (RowSpaceExceededException e) {
@@ -397,8 +396,7 @@ public class Table implements Index, Iterable<Row.Entry> {
// 'is' is the set of all indexes, that have the same reference
// we collect that entries now here
rows = new RowSet(this.rowdef, is.length);
- for (int j = 0; j < is.length; j++) {
- L = is[j];
+ for (final long L : is) {
assert (int) L < file.size() : "L.intValue() = " + (int) L + ", file.size = " + file.size(); // prevent ooBounds Exception
d.add(L);
if ((int) L >= file.size()) continue; // prevent IndexOutOfBoundsException
@@ -438,6 +436,7 @@ public class Table implements Index, Iterable<Row.Entry> {
this.index = null;
}
+ @Override
protected void finalize() {
if (this.file != null) this.close();
}
diff --git a/source/net/yacy/kelondro/util/BDecoder.java b/source/net/yacy/kelondro/util/BDecoder.java
index 41261e1f1..152dde300 100644
--- a/source/net/yacy/kelondro/util/BDecoder.java
+++ b/source/net/yacy/kelondro/util/BDecoder.java
@@ -6,6 +6,10 @@
// Frankfurt, Germany, 2010
// Created 03.01.2010
//
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
+//
// this is an BDecoder implementation according to http://wiki.theory.org/BitTorrentSpecification
//
// This program is free software; you can redistribute it and/or modify
@@ -60,6 +64,7 @@ public class BDecoder {
public long getInteger();
public List<BObject> getList();
public Map<String, BObject> getMap();
+ @Override
public String toString();
public void toStream(OutputStream os) throws IOException;
}
@@ -86,6 +91,7 @@ public class BDecoder {
throw new UnsupportedOperationException();
}
+ @Override
public String toString() {
throw new UnsupportedOperationException();
}
@@ -97,12 +103,15 @@ public class BDecoder {
public BStringObject(byte[] b) {
this.b = b;
}
+ @Override
public BType getType() {
return BType.string;
}
+ @Override
public byte[] getString() {
return this.b;
}
+ @Override
public String toString() {
return UTF8.String(this.b);
}
@@ -128,12 +137,15 @@ public class BDecoder {
public BListObject(List<BObject> l) {
this.l = l;
}
+ @Override
public BType getType() {
return BType.list;
}
+ @Override
public List<BObject> getList() {
return this.l;
}
+ @Override
public String toString() {
StringBuilder s = new StringBuilder();
s.append("[");
@@ -154,12 +166,15 @@ public class BDecoder {
public BDictionaryObject(Map<String, BObject> m) {
this.m = m;
}
+ @Override
public BType getType() {
return BType.dictionary;
}
+ @Override
public Map<String, BObject> getMap() {
return this.m;
}
+ @Override
public String toString() {
StringBuilder s = new StringBuilder();
s.append("{");
@@ -189,12 +204,15 @@ public class BDecoder {
public BIntegerObject(long i) {
this.i = i;
}
+ @Override
public BType getType() {
return BType.integer;
}
+ @Override
public long getInteger() {
return this.i;
}
+ @Override
public String toString() {
return Long.toString(this.i);
}
diff --git a/source/net/yacy/kelondro/util/BEncoder.java b/source/net/yacy/kelondro/util/BEncoder.java
index a6560380c..362370c5d 100644
--- a/source/net/yacy/kelondro/util/BEncoder.java
+++ b/source/net/yacy/kelondro/util/BEncoder.java
@@ -2,9 +2,9 @@
// (C) 2010 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 12.01.2010 on http://yacy.net
//
-// $LastChangedDate: 2008-03-14 01:16:04 +0100 (Fr, 14 Mrz 2008) $
-// $LastChangedRevision: 6563 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/net/yacy/kelondro/util/ByteArray.java b/source/net/yacy/kelondro/util/ByteArray.java
index 93cd089dc..795bb8182 100644
--- a/source/net/yacy/kelondro/util/ByteArray.java
+++ b/source/net/yacy/kelondro/util/ByteArray.java
@@ -2,9 +2,9 @@
// (C) 2007 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 30.03.2007 on http://yacy.net
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
-// $LastChangedRevision: 1986 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
@@ -81,6 +81,7 @@ public class ByteArray {
return order.compare(this.buffer, aoffset, b.buffer, boffset, blength);
}
+ @Override
public int hashCode() {
if (this.hash != 0) return this.hash;
this.hash = hashCode(this.buffer);
@@ -98,6 +99,7 @@ public class ByteArray {
return h;
}
+ @Override
public boolean equals(Object other) {
ByteArray b = (ByteArray) other;
if (buffer == null && b == null) return true;
diff --git a/source/net/yacy/kelondro/util/ByteBuffer.java b/source/net/yacy/kelondro/util/ByteBuffer.java
index 905a920ea..8dc6802e2 100644
--- a/source/net/yacy/kelondro/util/ByteBuffer.java
+++ b/source/net/yacy/kelondro/util/ByteBuffer.java
@@ -1,9 +1,12 @@
-// serverByteBuffer.java
+// ByteBuffer.java
// ---------------------------
// (C) by Michael Peter Christen; [email protected]
// first published on http://www.anomic.de
// Frankfurt, Germany, 2004
-// last major change: 11.03.2004
+//
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -146,10 +149,12 @@ public final class ByteBuffer extends OutputStream {
buffer[offset + length++] = b;
}
+ @Override
public void write(final byte[] bb) {
write(bb, 0, bb.length);
}
+ @Override
public void write(final byte[] bb, final int of, final int le) {
while (offset + length + le > buffer.length) grow();
System.arraycopy(bb, of, buffer, offset + length, le);
@@ -391,6 +396,7 @@ public final class ByteBuffer extends OutputStream {
}
+ @Override
public String toString() {
return UTF8.String(buffer, offset, length);
}
diff --git a/source/net/yacy/kelondro/util/CompressedHashMap.java b/source/net/yacy/kelondro/util/CompressedHashMap.java
index 4e79542a7..5252099d4 100644
--- a/source/net/yacy/kelondro/util/CompressedHashMap.java
+++ b/source/net/yacy/kelondro/util/CompressedHashMap.java
@@ -1,4 +1,4 @@
-// kelondroMHashMap.java
+// CompressedHashMap.java
// -----------------------
// part of YaCy
// (C) by Michael Peter Christen; [email protected]
@@ -6,6 +6,10 @@
// Frankfurt, Germany, 2005
// Created 08.12.2005
//
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
+//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
diff --git a/source/net/yacy/kelondro/util/ConsoleInterface.java b/source/net/yacy/kelondro/util/ConsoleInterface.java
index c8578c5fe..932715b7b 100644
--- a/source/net/yacy/kelondro/util/ConsoleInterface.java
+++ b/source/net/yacy/kelondro/util/ConsoleInterface.java
@@ -1,9 +1,13 @@
-//consoleInterface.java
+//ConsoleInterface.java
//-----------------------
//part of YaCy
//(C) by Detlef Reichl; detlef!reichl()gmx!org
//Pforzheim, Germany, 2008
//
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
+//
//This program is free software; you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
//the Free Software Foundation; either version 2 of the License, or
@@ -50,6 +54,7 @@ public class ConsoleInterface extends Thread {
}
}
+ @Override
public void run() {
// a second run adds data! a output.clear() maybe needed
try {
diff --git a/source/net/yacy/kelondro/util/EventTracker.java b/source/net/yacy/kelondro/util/EventTracker.java
index 50e432b63..da7174645 100644
--- a/source/net/yacy/kelondro/util/EventTracker.java
+++ b/source/net/yacy/kelondro/util/EventTracker.java
@@ -4,9 +4,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2009-11-05 21:28:37 +0100 (Do, 05 Nov 2009) $
-// $LastChangedRevision: 6458 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/net/yacy/kelondro/util/FileUtils.java b/source/net/yacy/kelondro/util/FileUtils.java
index b5e70197f..e21acaca7 100644
--- a/source/net/yacy/kelondro/util/FileUtils.java
+++ b/source/net/yacy/kelondro/util/FileUtils.java
@@ -3,7 +3,10 @@
// (C) by Michael Peter Christen; [email protected]
// first published on http://www.anomic.de
// Frankfurt, Germany, 2004
-// last major change: 05.08.2004
+//
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/source/net/yacy/kelondro/util/Formatter.java b/source/net/yacy/kelondro/util/Formatter.java
index 3c1125fc9..eaec41dcd 100644
--- a/source/net/yacy/kelondro/util/Formatter.java
+++ b/source/net/yacy/kelondro/util/Formatter.java
@@ -1,4 +1,4 @@
-// yFormatter.java
+// Formatter.java
// -----------------------
// part of YACY
// (C) by Michael Peter Christen; [email protected]
@@ -7,6 +7,10 @@
//
// (C) 2007 Bjoern 'Fuchs' Krombholz; [email protected]
//
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
+//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
diff --git a/source/net/yacy/kelondro/util/ISO639.java b/source/net/yacy/kelondro/util/ISO639.java
index a36100a0f..c66f3176e 100755
--- a/source/net/yacy/kelondro/util/ISO639.java
+++ b/source/net/yacy/kelondro/util/ISO639.java
@@ -4,9 +4,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
-// $LastChangedRevision: 1986 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/net/yacy/kelondro/util/LookAheadIterator.java b/source/net/yacy/kelondro/util/LookAheadIterator.java
index 1f5d660a6..acae69cb6 100644
--- a/source/net/yacy/kelondro/util/LookAheadIterator.java
+++ b/source/net/yacy/kelondro/util/LookAheadIterator.java
@@ -4,9 +4,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
-// $LastChangedRevision: 6539 $
-// $LastChangedBy: low012 $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/net/yacy/kelondro/util/MapTools.java b/source/net/yacy/kelondro/util/MapTools.java
index 8850801af..939cc78d5 100644
--- a/source/net/yacy/kelondro/util/MapTools.java
+++ b/source/net/yacy/kelondro/util/MapTools.java
@@ -1,4 +1,4 @@
-// serverCodings.java
+// MapTools.java
// -----------------------
// (C) by Michael Peter Christen; [email protected]
// first published on http://www.anomic.de
diff --git a/source/net/yacy/kelondro/util/MemoryControl.java b/source/net/yacy/kelondro/util/MemoryControl.java
index 25aa18a3c..767ca83ac 100644
--- a/source/net/yacy/kelondro/util/MemoryControl.java
+++ b/source/net/yacy/kelondro/util/MemoryControl.java
@@ -1,11 +1,11 @@
-// serverMemory.java
+// MemoryControl.java
// -------------------------------------------
// (C) 2005 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 22.09.2005 on http://yacy.net
//
-// $LastChangedDate: 2008-12-04 13:54:16 +0100 (Do, 04 Dez 2008) $
-// $LastChangedRevision: 5379 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
@@ -56,10 +56,8 @@ public class MemoryControl {
final long elapsed = System.currentTimeMillis() - lastGC;
if (elapsed > last) {
final long before = free();
- //System.out.println("vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv");
final long start = System.currentTimeMillis();
System.gc();
- //System.out.println("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ if you see this many times please report to forum");
lastGC = System.currentTimeMillis();
final long after = free();
gcs[gcs_pos++] = after - before;
diff --git a/source/net/yacy/kelondro/util/NamePrefixThreadFactory.java b/source/net/yacy/kelondro/util/NamePrefixThreadFactory.java
index 5f726df49..d7593fe42 100644
--- a/source/net/yacy/kelondro/util/NamePrefixThreadFactory.java
+++ b/source/net/yacy/kelondro/util/NamePrefixThreadFactory.java
@@ -4,9 +4,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2008-03-14 01:16:04 +0100 (Fr, 14 Mrz 2008) $
-// $LastChangedRevision: 4558 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/net/yacy/kelondro/util/ObjectSpace.java b/source/net/yacy/kelondro/util/ObjectSpace.java
index 696ba3e29..4c2f1211d 100644
--- a/source/net/yacy/kelondro/util/ObjectSpace.java
+++ b/source/net/yacy/kelondro/util/ObjectSpace.java
@@ -1,4 +1,4 @@
-// kelondroObjectSpace.java
+// ObjectSpace.java
// ------------------------
// part of The Kelondro Database
// (C) by Michael Peter Christen; [email protected]
@@ -6,6 +6,10 @@
// Frankfurt, Germany, 2005
// created: 12.12.2004
//
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
+//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
@@ -25,7 +29,9 @@ package net.yacy.kelondro.util;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.List;
import java.util.Map;
+import java.util.NavigableMap;
import java.util.TreeMap;
public class ObjectSpace {
@@ -33,8 +39,8 @@ public class ObjectSpace {
private static final int minSize = 10;
private static final int maxSize = 256;
- private static Map<Integer, ArrayList<byte[]>> objHeap = new HashMap<Integer, ArrayList<byte[]>>();
- private static TreeMap<Integer, Integer> aliveNow = new TreeMap<Integer, Integer>();
+ private static Map<Integer, List<byte[]>> objHeap = new HashMap<Integer, List<byte[]>>();
+ private static NavigableMap<Integer, Integer> aliveNow = new TreeMap<Integer, Integer>();
//private static TreeMap aliveMax = new TreeMap();
private static void incAlive(final int size) {
@@ -57,7 +63,7 @@ public class ObjectSpace {
if ((len < minSize) || (len > maxSize)) return new byte[len];
incAlive(len);
synchronized (objHeap) {
- final ArrayList<byte[]> buf = objHeap.get(Integer.valueOf(len));
+ final List<byte[]> buf = objHeap.get(Integer.valueOf(len));
if (buf == null || buf.isEmpty()) return new byte[len];
return buf.remove(buf.size() - 1);
}
@@ -70,7 +76,7 @@ public class ObjectSpace {
decAlive(b.length);
synchronized (objHeap) {
final Integer i = Integer.valueOf(b.length);
- ArrayList<byte[]> buf = objHeap.get(i);
+ List<byte[]> buf = objHeap.get(i);
if (buf == null) {
buf = new ArrayList<byte[]>();
buf.add(b);
@@ -81,7 +87,7 @@ public class ObjectSpace {
}
}
- public static TreeMap<Integer, Integer> statAlive() {
+ public static NavigableMap<Integer, Integer> statAlive() {
return aliveNow;
}
@@ -91,8 +97,8 @@ public class ObjectSpace {
// and shows how many Objects are held in this space for usage
final TreeMap<Integer, Integer> result = new TreeMap<Integer, Integer>();
synchronized (objHeap) {
- final Iterator<Map.Entry<Integer, ArrayList<byte[]>>> i = objHeap.entrySet().iterator();
- Map.Entry<Integer, ArrayList<byte[]>> entry;
+ final Iterator<Map.Entry<Integer, List<byte[]>>> i = objHeap.entrySet().iterator();
+ Map.Entry<Integer, List<byte[]>> entry;
while (i.hasNext()) {
entry = i.next();
result.put(entry.getKey(), Integer.valueOf(entry.getValue().size()));
diff --git a/source/net/yacy/kelondro/util/ReverseMapIterator.java b/source/net/yacy/kelondro/util/ReverseMapIterator.java
index da4af1ca6..cc590b5c0 100644
--- a/source/net/yacy/kelondro/util/ReverseMapIterator.java
+++ b/source/net/yacy/kelondro/util/ReverseMapIterator.java
@@ -4,9 +4,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2009-11-05 21:28:37 +0100 (Do, 05 Nov 2009) $
-// $LastChangedRevision: 6458 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/net/yacy/kelondro/util/XMLTables.java b/source/net/yacy/kelondro/util/XMLTables.java
index 8b2dec288..01f584cc7 100644
--- a/source/net/yacy/kelondro/util/XMLTables.java
+++ b/source/net/yacy/kelondro/util/XMLTables.java
@@ -1,4 +1,4 @@
-// kelondroXMLTables.java
+// XMLTables.java
// -------------------------
// part of The Kelondro Database
// (C) by Michael Peter Christen; [email protected]
@@ -6,9 +6,9 @@
// Frankfurt, Germany, 2006
// created 09.02.2006
//
-// $LastChangedDate: 2008-08-06 19:43:12 +0000 (Mi, 06 Aug 2008) $
-// $LastChangedRevision: 5039 $
-// $LastChangedBy: danielr $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -32,13 +32,14 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
-import java.util.Enumeration;
-import java.util.Hashtable;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
public class XMLTables {
- private Hashtable<String, Hashtable<String, String>> tables;
+ private Map<String, Map<String, String>> tables;
// tables is a hashtable that contains hashtables as values in the table
private File propFile;
@@ -47,7 +48,7 @@ public class XMLTables {
public XMLTables() {
this.propFile = null;
this.timestamp = System.currentTimeMillis();
- this.tables = new Hashtable<String, Hashtable<String, String>>();
+ this.tables = new HashMap<String, Map<String, String>>();
}
@SuppressWarnings("unchecked")
@@ -56,10 +57,10 @@ public class XMLTables {
this.timestamp = System.currentTimeMillis();
if (propFile.exists()) {
final XMLDecoder xmldec = new XMLDecoder(new FileInputStream(propFile));
- tables = (Hashtable<String, Hashtable<String, String>>) xmldec.readObject();
+ tables = (HashMap<String, Map<String, String>>) xmldec.readObject();
xmldec.close();
} else {
- tables = new Hashtable<String, Hashtable<String, String>>();
+ tables = new HashMap<String, Map<String, String>>();
}
}
@@ -103,23 +104,23 @@ public class XMLTables {
public int sizeTable(final String table) {
// returns number of entries in table; if table does not exist -1
- final Hashtable<String, String> l = tables.get(table);
+ final Map<String, String> l = tables.get(table);
if (l == null) return -1;
return l.size();
}
public void createTable(final String table) throws IOException {
// creates a new table
- final Hashtable<String, String> l = tables.get(table);
+ final Map<String, String> l = tables.get(table);
if (l != null)
return; // we do not overwite
- tables.put(table, new Hashtable<String, String>());
+ tables.put(table, new HashMap<String, String>());
if (this.propFile != null) commit(false);
}
public void set(final String table, final String key, String value) throws IOException {
if (table != null) {
- final Hashtable<String, String> l = tables.get(table);
+ final Map<String, String> l = tables.get(table);
if (l == null) throw new RuntimeException("Microtables.set: table does not exist");
if (value == null) value = "";
l.put(key, value);
@@ -130,7 +131,7 @@ public class XMLTables {
public String get(final String table, final String key, final String deflt) {
if (table != null) {
- final Hashtable<String, String> l = tables.get(table);
+ final Map<String, String> l = tables.get(table);
if (l == null)
throw new RuntimeException("Microtables.get: table does not exist");
if (!l.containsKey(key))
@@ -142,7 +143,7 @@ public class XMLTables {
public boolean has(final String table, final String key) {
if (table != null) {
- final Hashtable<String, String> l = tables.get(table);
+ final Map<String, String> l = tables.get(table);
if (l == null)
throw new RuntimeException("Microtables.has: table does not exist");
return (l.containsKey(key));
@@ -150,12 +151,12 @@ public class XMLTables {
return false;
}
- public Enumeration<String> keys(final String table) {
+ public Iterator<String> keys(final String table) {
if (table != null) {
- final Hashtable<String, String> l = tables.get(table);
+ final Map<String, String> l = tables.get(table);
if (l == null)
throw new RuntimeException("Microtables.keys: table does not exist");
- return l.keys();
+ return l.keySet().iterator();
}
return null;
}
diff --git a/source/net/yacy/kelondro/util/kelondroException.java b/source/net/yacy/kelondro/util/kelondroException.java
index 4b3b02493..3c5a7791d 100644
--- a/source/net/yacy/kelondro/util/kelondroException.java
+++ b/source/net/yacy/kelondro/util/kelondroException.java
@@ -5,9 +5,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
-// $LastChangedRevision: 1986 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/net/yacy/kelondro/workflow/AbstractBlockingThread.java b/source/net/yacy/kelondro/workflow/AbstractBlockingThread.java
index cbec33f99..a1860c2b6 100644
--- a/source/net/yacy/kelondro/workflow/AbstractBlockingThread.java
+++ b/source/net/yacy/kelondro/workflow/AbstractBlockingThread.java
@@ -1,8 +1,8 @@
-// serverAbstractBlockingThread.java
+// AbstractBlockingThread.java
// (C) 2008 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 27.03.2008 on http://yacy.net
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
diff --git a/source/net/yacy/kelondro/workflow/AbstractBusyThread.java b/source/net/yacy/kelondro/workflow/AbstractBusyThread.java
index 5fe9d82c4..b26f560fe 100644
--- a/source/net/yacy/kelondro/workflow/AbstractBusyThread.java
+++ b/source/net/yacy/kelondro/workflow/AbstractBusyThread.java
@@ -1,8 +1,8 @@
-// serverAbstractBusyThread.java
+// AbstractBusyThread.java
// (C) 2005 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 14.03.2005 on http://yacy.net
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
diff --git a/source/net/yacy/kelondro/workflow/AbstractThread.java b/source/net/yacy/kelondro/workflow/AbstractThread.java
index 59bc65401..2541a0a41 100644
--- a/source/net/yacy/kelondro/workflow/AbstractThread.java
+++ b/source/net/yacy/kelondro/workflow/AbstractThread.java
@@ -1,8 +1,8 @@
-// serverAbstractThread.java
+// AbstractThread.java
// (C) 2005 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 14.03.2005 on http://yacy.net
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
diff --git a/source/net/yacy/kelondro/workflow/BlockingThread.java b/source/net/yacy/kelondro/workflow/BlockingThread.java
index 86adc4aa0..e0cb38afc 100644
--- a/source/net/yacy/kelondro/workflow/BlockingThread.java
+++ b/source/net/yacy/kelondro/workflow/BlockingThread.java
@@ -1,8 +1,8 @@
-// serverBlockingThread.java
+// BlockingThread.java
// (C) 2008 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 27.03.2008 on http://yacy.net
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
diff --git a/source/net/yacy/kelondro/workflow/BusyThread.java b/source/net/yacy/kelondro/workflow/BusyThread.java
index befffbac7..c9577e4e5 100644
--- a/source/net/yacy/kelondro/workflow/BusyThread.java
+++ b/source/net/yacy/kelondro/workflow/BusyThread.java
@@ -1,8 +1,8 @@
-// serverBusyThread.java
+// BusyThread.java
// (C) 2008 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 27.03.2008 on http://yacy.net
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
diff --git a/source/net/yacy/kelondro/workflow/InstantBlockingThread.java b/source/net/yacy/kelondro/workflow/InstantBlockingThread.java
index de32c7831..2b31126d9 100644
--- a/source/net/yacy/kelondro/workflow/InstantBlockingThread.java
+++ b/source/net/yacy/kelondro/workflow/InstantBlockingThread.java
@@ -1,4 +1,4 @@
-// serverInstantBlockingThread.java
+// InstantBlockingThread.java
// (C) 2008 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 27.03.2008 on http://yacy.net
//
diff --git a/source/net/yacy/kelondro/workflow/InstantBusyThread.java b/source/net/yacy/kelondro/workflow/InstantBusyThread.java
index 44176476e..2b9f10e63 100644
--- a/source/net/yacy/kelondro/workflow/InstantBusyThread.java
+++ b/source/net/yacy/kelondro/workflow/InstantBusyThread.java
@@ -1,9 +1,12 @@
-// serverInstantThread.java
+// InstantBusyThread.java
// -----------------------
// (C) by Michael Peter Christen; [email protected]
// first published on http://www.anomic.de
// Frankfurt, Germany, 2005
-// last major change: 14.03.2005
+//
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/source/net/yacy/kelondro/workflow/WorkflowJob.java b/source/net/yacy/kelondro/workflow/WorkflowJob.java
index 15cf67a24..7f9b538c7 100644
--- a/source/net/yacy/kelondro/workflow/WorkflowJob.java
+++ b/source/net/yacy/kelondro/workflow/WorkflowJob.java
@@ -2,7 +2,7 @@
// (C) 2008 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 29.02.2008 on http://yacy.net
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
diff --git a/source/net/yacy/kelondro/workflow/WorkflowProcessor.java b/source/net/yacy/kelondro/workflow/WorkflowProcessor.java
index 5b2077ba7..b5d6e408f 100644
--- a/source/net/yacy/kelondro/workflow/WorkflowProcessor.java
+++ b/source/net/yacy/kelondro/workflow/WorkflowProcessor.java
@@ -1,8 +1,8 @@
-// serverProcessor.java
+// WorkflowProcessor.java
// (C) 2008 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 27.02.2008 on http://yacy.net
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
diff --git a/source/net/yacy/kelondro/workflow/WorkflowThread.java b/source/net/yacy/kelondro/workflow/WorkflowThread.java
index 54fe77e6c..353bd1e6c 100644
--- a/source/net/yacy/kelondro/workflow/WorkflowThread.java
+++ b/source/net/yacy/kelondro/workflow/WorkflowThread.java
@@ -1,8 +1,8 @@
-// serverThread.java
+// WorkflowThread.java
// (C) 2005 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 13.03.2005 on http://yacy.net
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
+// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
diff --git a/source/net/yacy/migration.java b/source/net/yacy/migration.java
index 8d7df2dee..183484f3f 100644
--- a/source/net/yacy/migration.java
+++ b/source/net/yacy/migration.java
@@ -3,7 +3,9 @@ package net.yacy;
// -----------------------
// (C) by Alexander Schier
//
-// last change: $LastChangedDate: $ by $LastChangedBy: $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/source/net/yacy/repository/BlacklistFile.java b/source/net/yacy/repository/BlacklistFile.java
index 9895cae6a..5c516ae09 100644
--- a/source/net/yacy/repository/BlacklistFile.java
+++ b/source/net/yacy/repository/BlacklistFile.java
@@ -4,9 +4,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2009-09-29 23:28:49 +0200 (Di, 29 Sep 2009) $
-// $LastChangedRevision: 6359 $
-// $LastChangedBy: low012 $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/net/yacy/repository/FilterEngine.java b/source/net/yacy/repository/FilterEngine.java
index 7cf63465d..41d08e396 100644
--- a/source/net/yacy/repository/FilterEngine.java
+++ b/source/net/yacy/repository/FilterEngine.java
@@ -34,25 +34,25 @@ public class FilterEngine {
public static final int ERR_DOUBLE_OCCURANCE = 6;
public static final int ERR_HOST_REGEX = 7;
- protected enum listTypes { type1 };
-
- protected class FilterEntry implements Comparable<FilterEntry> {
- public String path;
- public EnumSet<listTypes> types;
-
- public FilterEntry(String path, EnumSet<listTypes>types) {
- this.path = path;
- this.types = types;
- }
+ protected enum listTypes { type1 };
+
+ protected class FilterEntry implements Comparable<FilterEntry> {
+ public String path;
+ public EnumSet<listTypes> types;
+
+ public FilterEntry(String path, EnumSet<listTypes>types) {
+ this.path = path;
+ this.types = types;
+ }
- public int compareTo(FilterEntry fe) {
- return this.path.compareToIgnoreCase(fe.path);
- }
- }
+ public int compareTo(FilterEntry fe) {
+ return this.path.compareToIgnoreCase(fe.path);
+ }
+ }
protected HashARC<DigestURI, EnumSet<listTypes>> cachedUrlHashs = null;
- protected HashMap<String, Set<FilterEntry>> hostpaths_matchable = null;
- protected HashMap<String, Set<FilterEntry>> hostpaths_notmatchable = null;
+ protected Map<String, Set<FilterEntry>> hostpaths_matchable = null;
+ protected Map<String, Set<FilterEntry>> hostpaths_notmatchable = null;
public FilterEngine() {
diff --git a/source/net/yacy/upnp/Discovery.java b/source/net/yacy/upnp/Discovery.java
index 910656250..74629837e 100644
--- a/source/net/yacy/upnp/Discovery.java
+++ b/source/net/yacy/upnp/Discovery.java
@@ -206,7 +206,7 @@ public class Discovery {
DiscoveryListener.getInstance().unRegisterResultsHandler( handler, searchTarget );
- if ( devices.size() == 0 ) {
+ if ( devices.isEmpty() ) {
return null;
}
int j = 0;
@@ -238,7 +238,7 @@ public class Discovery {
java.net.MulticastSocket skt = new java.net.MulticastSocket( null );
skt.bind( new InetSocketAddress( src, bindPort ) );
skt.setTimeToLive( ttl );
- StringBuffer packet = new StringBuffer();
+ StringBuilder packet = new StringBuilder();
packet.append( "M-SEARCH * HTTP/1.1\r\n" );
packet.append( "HOST: 239.255.255.250:1900\r\n" );
packet.append( "MAN: \"ssdp:discover\"\r\n" );
diff --git a/source/net/yacy/upnp/DiscoveryAdvertisement.java b/source/net/yacy/upnp/DiscoveryAdvertisement.java
index 1d1c9975d..5423bf211 100644
--- a/source/net/yacy/upnp/DiscoveryAdvertisement.java
+++ b/source/net/yacy/upnp/DiscoveryAdvertisement.java
@@ -155,7 +155,7 @@ public class DiscoveryAdvertisement implements Runnable {
Set<DiscoveryEventHandler> handlers = aliveRegistered.get( nt );
if ( handlers != null ) {
handlers.remove( eventHandler );
- if ( handlers.size() == 0 ) {
+ if (handlers.isEmpty()) {
aliveRegistered.remove( nt );
}
}
@@ -163,14 +163,14 @@ public class DiscoveryAdvertisement implements Runnable {
Set<DiscoveryEventHandler> handlers = byeByeRegistered.get( nt );
if ( handlers != null ) {
handlers.remove( eventHandler );
- if ( handlers.size() == 0 ) {
+ if (handlers.isEmpty()) {
byeByeRegistered.remove( nt );
}
}
} else {
throw new IllegalArgumentException( "Unknown notificationEvent type" );
}
- if ( aliveRegistered.size() == 0 && byeByeRegistered.size() == 0 ) {
+ if (aliveRegistered.isEmpty() && byeByeRegistered.isEmpty()) {
stopDevicesListenerThread();
}
}
diff --git a/source/net/yacy/upnp/DiscoveryListener.java b/source/net/yacy/upnp/DiscoveryListener.java
index f8f2b9ac8..5b0427dc4 100644
--- a/source/net/yacy/upnp/DiscoveryListener.java
+++ b/source/net/yacy/upnp/DiscoveryListener.java
@@ -128,11 +128,11 @@ public class DiscoveryListener implements Runnable {
Set<DiscoveryResultsHandler> handlers = registeredHandlers.get( searchTarget );
if ( handlers != null ) {
handlers.remove( resultsHandler );
- if ( handlers.size() == 0 ) {
+ if (handlers.isEmpty()) {
registeredHandlers.remove( searchTarget );
}
}
- if ( registeredHandlers.size() == 0 ) {
+ if (registeredHandlers.isEmpty()) {
stopDevicesListenerThread();
}
}
diff --git a/source/net/yacy/upnp/HttpResponse.java b/source/net/yacy/upnp/HttpResponse.java
index 5b3d888ad..ad3df87ce 100644
--- a/source/net/yacy/upnp/HttpResponse.java
+++ b/source/net/yacy/upnp/HttpResponse.java
@@ -72,7 +72,7 @@ public class HttpResponse {
throw new IllegalArgumentException( "Empty HTTP response message" );
}
boolean bodyParsing = false;
- StringBuffer bodyParsed = new StringBuffer();
+ StringBuilder bodyParsed = new StringBuilder();
fields = new HashMap<String, String>();
String[] lines = rawHttpResponse.split( "\\r\\n" );
this.header = lines[0].trim();
diff --git a/source/net/yacy/upnp/JXPathParser.java b/source/net/yacy/upnp/JXPathParser.java
index 8095200cc..213d5df55 100644
--- a/source/net/yacy/upnp/JXPathParser.java
+++ b/source/net/yacy/upnp/JXPathParser.java
@@ -71,7 +71,7 @@ public class JXPathParser implements XMLParser {
private char buggyChar = (char)0;
public Object parseXML( InputStream in ){
- StringBuffer xml = new StringBuffer();
+ StringBuilder xml = new StringBuilder();
try {
byte[] buffer = new byte[512];
int readen = 0;
diff --git a/source/net/yacy/upnp/ServiceEventMessageParser.java b/source/net/yacy/upnp/ServiceEventMessageParser.java
index acbfbe587..af5e0c648 100644
--- a/source/net/yacy/upnp/ServiceEventMessageParser.java
+++ b/source/net/yacy/upnp/ServiceEventMessageParser.java
@@ -73,6 +73,7 @@ public class ServiceEventMessageParser extends org.xml.sax.helpers.DefaultHandle
return changedStateVars;
}
+ @Override
public void characters( char[] ch, int start, int length ) {
if ( currentPropName != null ) {
String origChars = changedStateVars.get( currentPropName );
@@ -85,6 +86,7 @@ public class ServiceEventMessageParser extends org.xml.sax.helpers.DefaultHandle
}
}
+ @Override
public void startElement( String uri, String localName, String qName, Attributes attributes ) {
if ( localName.equals( "property" ) ) {
readPropertyName = true;
@@ -93,6 +95,7 @@ public class ServiceEventMessageParser extends org.xml.sax.helpers.DefaultHandle
}
}
+ @Override
public void endElement( String uri, String localName, String qName ) {
if ( currentPropName != null && localName.equals( currentPropName ) ) {
readPropertyName = false;
diff --git a/source/net/yacy/upnp/ServicesEventing.java b/source/net/yacy/upnp/ServicesEventing.java
index 38d1fd2ca..160012459 100644
--- a/source/net/yacy/upnp/ServicesEventing.java
+++ b/source/net/yacy/upnp/ServicesEventing.java
@@ -164,7 +164,7 @@ public class ServicesEventing implements Runnable {
out.flush();
InputStream in = skt.getInputStream();
- StringBuffer data = new StringBuffer();
+ StringBuilder data = new StringBuilder();
int readen = 0;
byte[] buffer = new byte[256];
while ( ( readen = in.read( buffer ) ) != -1 ) {
@@ -261,7 +261,7 @@ public class ServicesEventing implements Runnable {
synchronized( registered ) {
registered.remove( sub );
}
- if ( registered.size() == 0 ) {
+ if (registered.isEmpty()) {
stopServicesEventingThread();
}
@@ -277,7 +277,7 @@ public class ServicesEventing implements Runnable {
out.flush();
InputStream in = skt.getInputStream();
- StringBuffer data = new StringBuffer();
+ StringBuilder data = new StringBuilder();
int readen = 0;
byte[] buffer = new byte[256];
while ( ( readen = in.read( buffer ) ) != -1 ) {
@@ -362,7 +362,7 @@ public class ServicesEventing implements Runnable {
OutputStream out = client.getOutputStream();
int readen = 0;
- StringBuffer data = new StringBuffer();
+ StringBuilder data = new StringBuilder();
byte[] buffer = new byte[256];
boolean EOF = false;
while ( !EOF && ( readen = in.read( buffer ) ) != -1 ) {
diff --git a/source/net/yacy/upnp/devices/UPNPDevice.java b/source/net/yacy/upnp/devices/UPNPDevice.java
index a247e0e3d..d1e59a5ea 100644
--- a/source/net/yacy/upnp/devices/UPNPDevice.java
+++ b/source/net/yacy/upnp/devices/UPNPDevice.java
@@ -281,7 +281,7 @@ public class UPNPDevice {
rtrVal.add( service );
}
}
- if ( rtrVal.size() == 0 ) {
+ if ( rtrVal.isEmpty() ) {
return null;
}
return rtrVal;
@@ -291,6 +291,7 @@ public class UPNPDevice {
* The toString return the device type
* @return the device type
*/
+ @Override
public String toString() {
return getDeviceType();
}
diff --git a/source/net/yacy/upnp/devices/UPNPRootDevice.java b/source/net/yacy/upnp/devices/UPNPRootDevice.java
index 867042dcb..4b0bfd9ed 100644
--- a/source/net/yacy/upnp/devices/UPNPRootDevice.java
+++ b/source/net/yacy/upnp/devices/UPNPRootDevice.java
@@ -439,7 +439,7 @@ public class UPNPRootDevice extends UPNPDevice {
java.io.InputStream in = deviceDefLoc.openConnection().getInputStream();
int readen = 0;
byte[] buff = new byte[512];
- StringBuffer strBuff = new StringBuffer();
+ StringBuilder strBuff = new StringBuilder();
while( ( readen = in.read( buff ) ) != -1 ) {
strBuff.append( new String( buff, 0, readen ) );
}
diff --git a/source/net/yacy/upnp/impls/InternetGatewayDevice.java b/source/net/yacy/upnp/impls/InternetGatewayDevice.java
index 0ccd48479..d86609e3e 100644
--- a/source/net/yacy/upnp/impls/InternetGatewayDevice.java
+++ b/source/net/yacy/upnp/impls/InternetGatewayDevice.java
@@ -263,7 +263,7 @@ public class InternetGatewayDevice {
if ( log.isDebugEnabled() ) log.debug( "UnsupportedOperationException during discovery " + ex.getMessage() );
}
}
- if ( valid.size() == 0 ) {
+ if ( valid.isEmpty() ) {
return null;
}
rtrVal = new InternetGatewayDevice[valid.size()];
diff --git a/source/net/yacy/upnp/messages/ActionMessage.java b/source/net/yacy/upnp/messages/ActionMessage.java
index d6772f469..a8e080584 100644
--- a/source/net/yacy/upnp/messages/ActionMessage.java
+++ b/source/net/yacy/upnp/messages/ActionMessage.java
@@ -216,7 +216,7 @@ public class ActionMessage {
private String getResponseBody( InputStream in ) throws IOException {
byte[] buffer = new byte[256];
int readen = 0;
- StringBuffer content = new StringBuffer( 256 );
+ StringBuilder content = new StringBuilder( 256 );
while ( ( readen = in.read( buffer ) ) != -1 ) {
content.append( new String( buffer, 0 , readen ) );
}
diff --git a/source/net/yacy/upnp/messages/ActionMessageResponseParser.java b/source/net/yacy/upnp/messages/ActionMessageResponseParser.java
index 651f1fcc5..bec8b2e7e 100644
--- a/source/net/yacy/upnp/messages/ActionMessageResponseParser.java
+++ b/source/net/yacy/upnp/messages/ActionMessageResponseParser.java
@@ -91,6 +91,7 @@ public class ActionMessageResponseParser extends org.xml.sax.helpers.DefaultHand
return result;
}
+ @Override
public void characters( char[] ch, int start, int length ) {
if ( parseOutputParams ) {
if ( parsedResultOutArg != null ) {
@@ -122,6 +123,7 @@ public class ActionMessageResponseParser extends org.xml.sax.helpers.DefaultHand
}
}
+ @Override
public void startElement( String uri, String localName, String qName, Attributes attributes ) {
if ( parseOutputParams ) {
ServiceActionArgument arg = serviceAction.getActionArgument( localName );
@@ -150,6 +152,7 @@ public class ActionMessageResponseParser extends org.xml.sax.helpers.DefaultHand
}
}
+ @Override
public void endElement( String uri, String localName, String qName ) {
if ( parsedResultOutArg != null && parsedResultOutArg.getName().equals( localName ) ) {
parsedResultOutArg = null;
diff --git a/source/net/yacy/upnp/messages/ActionResponse.java b/source/net/yacy/upnp/messages/ActionResponse.java
index 257ec1a82..d25eceb75 100644
--- a/source/net/yacy/upnp/messages/ActionResponse.java
+++ b/source/net/yacy/upnp/messages/ActionResponse.java
@@ -87,8 +87,9 @@ public class ActionResponse {
outArgumentsVals.put( arg.getName(), value );
}
+ @Override
public String toString() {
- StringBuffer rtrVal = new StringBuffer();
+ StringBuilder rtrVal = new StringBuilder();
for ( Iterator<String> i = outArguments.keySet().iterator(); i.hasNext(); ) {
String name = i.next();
String value = outArgumentsVals.get( name );
diff --git a/source/net/yacy/upnp/messages/StateVariableMessage.java b/source/net/yacy/upnp/messages/StateVariableMessage.java
index 3f2829b9c..d77b18aeb 100644
--- a/source/net/yacy/upnp/messages/StateVariableMessage.java
+++ b/source/net/yacy/upnp/messages/StateVariableMessage.java
@@ -188,7 +188,7 @@ public class StateVariableMessage {
private String getResponseBody( InputStream in ) throws IOException {
byte[] buffer = new byte[256];
int readen = 0;
- StringBuffer content = new StringBuffer( 256 );
+ StringBuilder content = new StringBuilder( 256 );
while ( ( readen = in.read( buffer ) ) != -1 ) {
content.append( new String( buffer, 0 , readen ) );
}
diff --git a/source/net/yacy/upnp/messages/UPNPResponseException.java b/source/net/yacy/upnp/messages/UPNPResponseException.java
index 8e1417b60..a8652a800 100644
--- a/source/net/yacy/upnp/messages/UPNPResponseException.java
+++ b/source/net/yacy/upnp/messages/UPNPResponseException.java
@@ -86,10 +86,12 @@ public class UPNPResponseException extends Exception {
return detailErrorDescription;
}
+ @Override
public String getMessage() {
return "Detailed error code :" + detailErrorCode + ", Detailed error description :" + detailErrorDescription;
}
+ @Override
public String getLocalizedMessage() {
return getMessage();
}
diff --git a/source/net/yacy/upnp/services/ISO8601Date.java b/source/net/yacy/upnp/services/ISO8601Date.java
index cbc6ef307..c43f9bac2 100644
--- a/source/net/yacy/upnp/services/ISO8601Date.java
+++ b/source/net/yacy/upnp/services/ISO8601Date.java
@@ -229,7 +229,7 @@ public class ISO8601Date {
public static String getIsoDate(Date date) {
Calendar calendar = new GregorianCalendar();
calendar.setTime(date);
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append(calendar.get(Calendar.YEAR));
buffer.append("-");
buffer.append(twoDigit(calendar.get(Calendar.MONTH) + 1));
@@ -246,7 +246,7 @@ public class ISO8601Date {
public static String getIsoDateTime(Date date) {
Calendar calendar = new GregorianCalendar();
calendar.setTime(date);
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append(calendar.get(Calendar.YEAR));
buffer.append("-");
buffer.append(twoDigit(calendar.get(Calendar.MONTH) + 1));
@@ -271,7 +271,7 @@ public class ISO8601Date {
public static String getIsoDateTimeZone(Date date) {
Calendar calendar = new GregorianCalendar(TimeZone.getTimeZone("UTC"));
calendar.setTime(date);
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append(calendar.get(Calendar.YEAR));
buffer.append("-");
buffer.append(twoDigit(calendar.get(Calendar.MONTH) + 1));
@@ -297,7 +297,7 @@ public class ISO8601Date {
public static String getIsoTime(Date date) {
Calendar calendar = new GregorianCalendar();
calendar.setTime(date);
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append(twoDigit(calendar.get(Calendar.HOUR_OF_DAY)));
buffer.append(":");
buffer.append(twoDigit(calendar.get(Calendar.MINUTE)));
@@ -316,7 +316,7 @@ public class ISO8601Date {
public static String getIsoTimeZone(Date date) {
Calendar calendar = new GregorianCalendar(TimeZone.getTimeZone("UTC"));
calendar.setTime(date);
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append(twoDigit(calendar.get(Calendar.HOUR_OF_DAY)));
buffer.append(":");
buffer.append(twoDigit(calendar.get(Calendar.MINUTE)));
diff --git a/source/net/yacy/upnp/services/ServiceAction.java b/source/net/yacy/upnp/services/ServiceAction.java
index 18e1e8765..bcd98071d 100644
--- a/source/net/yacy/upnp/services/ServiceAction.java
+++ b/source/net/yacy/upnp/services/ServiceAction.java
@@ -183,7 +183,7 @@ public class ServiceAction {
rtrVal.add( actArg );
}
}
- if ( rtrVal.size() == 0 ) rtrVal = null;
+ if ( rtrVal.isEmpty() ) rtrVal = null;
return rtrVal;
}
@@ -196,7 +196,7 @@ public class ServiceAction {
rtrVal.add( actArg.getName() );
}
}
- if ( rtrVal.size() == 0 ) rtrVal = null;
+ if ( rtrVal.isEmpty() ) rtrVal = null;
return rtrVal;
}
}
diff --git a/source/net/yacy/upnp/services/UPNPService.java b/source/net/yacy/upnp/services/UPNPService.java
index efe8ec260..407b2d2c7 100644
--- a/source/net/yacy/upnp/services/UPNPService.java
+++ b/source/net/yacy/upnp/services/UPNPService.java
@@ -317,7 +317,7 @@ public class UPNPService {
java.io.InputStream in = SCPDURL.openConnection().getInputStream();
int readen = 0;
byte[] buff = new byte[512];
- StringBuffer strBuff = new StringBuffer();
+ StringBuilder strBuff = new StringBuilder();
while( ( readen = in.read( buff ) ) != -1 ) {
strBuff.append( new String( buff, 0, readen ) );
}
diff --git a/source/net/yacy/visualization/AnimationGIF.java b/source/net/yacy/visualization/AnimationGIF.java
index 06f69b047..6d52596f8 100644
--- a/source/net/yacy/visualization/AnimationGIF.java
+++ b/source/net/yacy/visualization/AnimationGIF.java
@@ -3,9 +3,9 @@
* Copyright 2010 by Michael Christen
* First released 20.11.2010 at http://yacy.net
*
- * $LastChangedDate: 2010-06-16 17:11:21 +0200 (Mi, 16 Jun 2010) $
- * $LastChangedRevision: 6974 $
- * $LastChangedBy: orbiter $
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/source/net/yacy/visualization/Captcha.java b/source/net/yacy/visualization/Captcha.java
index 27e87c38a..74ececf11 100644
--- a/source/net/yacy/visualization/Captcha.java
+++ b/source/net/yacy/visualization/Captcha.java
@@ -3,9 +3,9 @@
// part of YaCy
// (C) by Marc Nause
//
-// $LastChangedDate: 2007-04-03 22:56:00 +0100 (Di, 04 Apr 2007) $
-// $LastChangedRevision: 3542 $
-// $LastChangedBy: low012 $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/source/net/yacy/visualization/ChartPlotter.java b/source/net/yacy/visualization/ChartPlotter.java
index 5f2ae1bf0..ca16bd367 100644
--- a/source/net/yacy/visualization/ChartPlotter.java
+++ b/source/net/yacy/visualization/ChartPlotter.java
@@ -5,6 +5,10 @@
// Frankfurt, Germany, 2005
// created: 26.10.2005
//
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
+//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
diff --git a/source/net/yacy/visualization/CircleTool.java b/source/net/yacy/visualization/CircleTool.java
index 01e707aeb..10fa5435c 100644
--- a/source/net/yacy/visualization/CircleTool.java
+++ b/source/net/yacy/visualization/CircleTool.java
@@ -4,9 +4,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
-// $LastChangedRevision: 1986 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/net/yacy/visualization/FontGenerator5Pixel.java b/source/net/yacy/visualization/FontGenerator5Pixel.java
index 982907dad..f4b552a6f 100644
--- a/source/net/yacy/visualization/FontGenerator5Pixel.java
+++ b/source/net/yacy/visualization/FontGenerator5Pixel.java
@@ -5,6 +5,10 @@
// Frankfurt, Germany, 2005
// created: 31.10.2005
//
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
+//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
diff --git a/source/net/yacy/visualization/FontGenerator8Pixel.java b/source/net/yacy/visualization/FontGenerator8Pixel.java
index 1c5d8cb85..30a570e66 100644
--- a/source/net/yacy/visualization/FontGenerator8Pixel.java
+++ b/source/net/yacy/visualization/FontGenerator8Pixel.java
@@ -3,8 +3,12 @@
// by Marc Nause
// created: 05.04.2007
//
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
+//
// based on:
-// ymageFontGenerator.java
+// FontGenerator5Pixle.java
// ---------------------------
// (C) by Michael Peter Christen; [email protected]
// first published on http://www.anomic.de
diff --git a/source/net/yacy/visualization/GraphPlotter.java b/source/net/yacy/visualization/GraphPlotter.java
index abe732947..0287d6250 100644
--- a/source/net/yacy/visualization/GraphPlotter.java
+++ b/source/net/yacy/visualization/GraphPlotter.java
@@ -4,9 +4,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
-// $LastChangedRevision: 1986 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/net/yacy/visualization/HexGridPlotter.java b/source/net/yacy/visualization/HexGridPlotter.java
index 440fed2e3..95cff525c 100644
--- a/source/net/yacy/visualization/HexGridPlotter.java
+++ b/source/net/yacy/visualization/HexGridPlotter.java
@@ -3,9 +3,9 @@
* Copyright 2011 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
* First released 18.02.2010 at http://yacy.net
*
- * $LastChangedDate: 2010-06-16 17:11:21 +0200 (Mi, 16 Jun 2010) $
- * $LastChangedRevision: 6922 $
- * $LastChangedBy: orbiter $
+ * $LastChangedDate$
+ * $LastChangedRevision$
+ * $LastChangedBy$
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/source/net/yacy/visualization/PrintTool.java b/source/net/yacy/visualization/PrintTool.java
index b2f90e7b0..bae2f460c 100644
--- a/source/net/yacy/visualization/PrintTool.java
+++ b/source/net/yacy/visualization/PrintTool.java
@@ -4,9 +4,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
-// $LastChangedRevision: 1986 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/net/yacy/visualization/RasterPlotter.java b/source/net/yacy/visualization/RasterPlotter.java
index 4f7c752c1..3c904a021 100644
--- a/source/net/yacy/visualization/RasterPlotter.java
+++ b/source/net/yacy/visualization/RasterPlotter.java
@@ -4,9 +4,9 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
-// $LastChangedRevision: 1986 $
-// $LastChangedBy: orbiter $
+// $LastChangedDate$
+// $LastChangedRevision$
+// $LastChangedBy$
//
// LICENSE
//
diff --git a/source/org/apache/tools/tar/TarEntry.java b/source/org/apache/tools/tar/TarEntry.java
index 42fcb9f43..20c781a02 100644
--- a/source/org/apache/tools/tar/TarEntry.java
+++ b/source/org/apache/tools/tar/TarEntry.java
@@ -282,6 +282,7 @@ public class TarEntry implements TarConstants {
* @param it Entry to be checked for equality.
* @return True if the entries are equal.
*/
+ @Override
public boolean equals(final Object obj) {
if (this == obj) return true;
if (obj == null) return false;
@@ -295,6 +296,7 @@ public class TarEntry implements TarConstants {
*
* @return the entry hashcode
*/
+ @Override
public int hashCode() {
return getName().hashCode();
}
diff --git a/source/org/apache/tools/tar/TarInputStream.java b/source/org/apache/tools/tar/TarInputStream.java
index 7be17cefd..74fe5e88b 100644
--- a/source/org/apache/tools/tar/TarInputStream.java
+++ b/source/org/apache/tools/tar/TarInputStream.java
@@ -110,6 +110,7 @@ public class TarInputStream extends FilterInputStream {
* Closes this stream. Calls the TarBuffer's close() method.
* @throws IOException on error
*/
+ @Override
public void close() throws IOException {
this.buffer.close();
}
@@ -135,6 +136,7 @@ public class TarInputStream extends FilterInputStream {
* @return The number of available bytes for the current entry.
* @throws IOException for signature
*/
+ @Override
public int available() throws IOException {
if (this.entrySize - this.entryOffset > Integer.MAX_VALUE) {
return Integer.MAX_VALUE;
@@ -152,6 +154,7 @@ public class TarInputStream extends FilterInputStream {
* @return the number actually skipped
* @throws IOException on error
*/
+ @Override
public long skip(long numToSkip) throws IOException {
// REVIEW
// This is horribly inefficient, but it ensures that we
@@ -175,6 +178,7 @@ public class TarInputStream extends FilterInputStream {
*
* @return False.
*/
+ @Override
public boolean markSupported() {
return false;
}
@@ -184,12 +188,14 @@ public class TarInputStream extends FilterInputStream {
*
* @param markLimit The limit to mark.
*/
+ @Override
public synchronized void mark(int markLimit) {
}
/**
* Since we do not support marking just yet, we do nothing.
*/
+ @Override
public synchronized void reset() {
}
@@ -293,6 +299,7 @@ public class TarInputStream extends FilterInputStream {
* @return The byte read, or -1 at EOF.
* @throws IOException on error
*/
+ @Override
public int read() throws IOException {
int num = this.read(this.oneBuf, 0, 1);
return num == -1 ? -1 : ((int) this.oneBuf[0]) & BYTE_MASK;
@@ -311,6 +318,7 @@ public class TarInputStream extends FilterInputStream {
* @return The number of bytes read, or -1 at EOF.
* @throws IOException on error
*/
+ @Override
public int read(byte[] buf, int offset, int numToRead) throws IOException {
int totalRead = 0;
diff --git a/source/org/apache/tools/tar/TarOutputStream.java b/source/org/apache/tools/tar/TarOutputStream.java
index 852bee2a8..75f9c53d3 100644
--- a/source/org/apache/tools/tar/TarOutputStream.java
+++ b/source/org/apache/tools/tar/TarOutputStream.java
@@ -140,6 +140,7 @@ public class TarOutputStream extends FilterOutputStream {
* TarBuffer's close().
* @throws IOException on error
*/
+ @Override
public void close() throws IOException {
if (!closed) {
this.finish();
@@ -242,6 +243,7 @@ public class TarOutputStream extends FilterOutputStream {
* @param b The byte written.
* @throws IOException on error
*/
+ @Override
public void write(int b) throws IOException {
this.oneBuf[0] = (byte) b;
@@ -256,6 +258,7 @@ public class TarOutputStream extends FilterOutputStream {
* @param wBuf The buffer to write to the archive.
* @throws IOException on error
*/
+ @Override
public void write(byte[] wBuf) throws IOException {
this.write(wBuf, 0, wBuf.length);
}
@@ -274,6 +277,7 @@ public class TarOutputStream extends FilterOutputStream {
* @param numToWrite The number of bytes to write.
* @throws IOException on error
*/
+ @Override
public void write(byte[] wBuf, int wOffset, int numToWrite) throws IOException {
if ((this.currBytes + numToWrite) > this.currSize) {
throw new IOException("request to write '" + numToWrite