more PMD recommendations

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6567 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 15 years ago
parent 909a4f91c7
commit 66c0a8e849

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

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save