more PMD recommendations

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6567 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
orbiter 2010-01-11 22:18:38 +00:00
parent 909a4f91c7
commit 66c0a8e849
11 changed files with 17 additions and 16 deletions

View File

@ -522,7 +522,7 @@ public class CrawlQueues {
protected Request request;
private final Integer code;
private long start;
private final long start;
public crawlWorker(final Request entry) {
this.start = System.currentTimeMillis();

View File

@ -104,7 +104,7 @@ public class bookmarksDB {
MapView datesTable;
// autoReCrawl
private BusyThread autoReCrawl;
private final BusyThread autoReCrawl;
// ------------------------------------
// bookmarksDB's class constructor

View File

@ -49,7 +49,7 @@ public class ReferenceOrder {
protected WordReferenceVars min, max;
protected final ScoreCluster<String> doms; // collected for "authority" heuristic
private final RankingProfile ranking;
private String language;
private final String language;
public ReferenceOrder(final RankingProfile profile, String language) {
this.min = null;

View File

@ -53,6 +53,7 @@ import java.util.HashMap;
import java.util.Map;
import net.yacy.document.parser.html.CharacterCoding;
import net.yacy.kelondro.data.meta.DigestURI;
import net.yacy.kelondro.logging.Log;
import net.yacy.kelondro.util.DateFormatter;
import net.yacy.kelondro.util.Formatter;
@ -360,9 +361,9 @@ public class serverObjects extends HashMap<String, String> implements Cloneable
if (this.size() == 0) return "";
StringBuilder param = new StringBuilder();
for (Map.Entry<String, String> entry: this.entrySet()) {
param.append(entry.getKey());
param.append(DigestURI.escape(entry.getKey()));
param.append('=');
param.append(entry.getValue());
param.append(DigestURI.escape(entry.getValue()));
param.append('&');
}
param.setLength(param.length() - 1);

View File

@ -218,7 +218,7 @@ class nativeTrayIcon {
Method setImageAutoSizeMethod = TrayIconClass.getMethod("setImageAutoSize", partypes2);
Object arglist2[] = new Object[1];
arglist2[0] = Boolean.valueOf(true);
arglist2[0] = Boolean.TRUE;
setImageAutoSizeMethod.invoke(this.TrayIcon, arglist2);
// with reflections: this.TrayIcon.addActionListener(al)

View File

@ -89,7 +89,7 @@ public final class yacySeedDB implements AlternativeDomainNames {
public yacyPeerActions peerActions;
public yacyNewsPool newsPool;
private int netRedundancy;
private final int netRedundancy;
public PartitionScheme scheme;
private yacySeed mySeed; // my own seed

View File

@ -37,8 +37,8 @@ import net.yacy.kelondro.data.meta.DigestURI;
*
*/
public class yacyUpdateLocation {
private DigestURI locationURL;
private PublicKey publicKey;
private final DigestURI locationURL;
private final PublicKey publicKey;
public yacyUpdateLocation(DigestURI locationURL, PublicKey publicKey) {
this.locationURL = locationURL;

View File

@ -89,7 +89,7 @@ public class ServicesEventing implements Runnable {
private ServerSocket server = null;
private List registered = new ArrayList();
private final List registered = new ArrayList();
private ServicesEventing() {
}
@ -359,9 +359,9 @@ public class ServicesEventing implements Runnable {
class RequestProcessor implements Runnable {
private Socket client;
private final Socket client;
RequestProcessor( Socket client ) {
RequestProcessor(final Socket client) {
this.client = client;
}

View File

@ -77,7 +77,7 @@ public class UPNPService {
protected Map UPNPServiceActions;
protected Map UPNPServiceStateVariables;
private String USN;
private final String USN;
private boolean parsedSCPD = false;
private DocumentContainer UPNPService;

View File

@ -36,7 +36,7 @@ import net.yacy.kelondro.util.FileUtils;
public class ImportDump {
private DatabaseConnection conn = null;
private final DatabaseConnection conn;
public ImportDump(
String dbType,

View File

@ -1039,8 +1039,8 @@ public final class yacy {
* machine shuts down. Signals the plasmaSwitchboard to shut down.
*/
class shutdownHookThread extends Thread {
private Switchboard sb = null;
private Thread mainThread = null;
private final Switchboard sb;
private final Thread mainThread;
public shutdownHookThread(final Thread mainThread, final Switchboard sb) {
super();