Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
problems with code style
orbiter93dfb51fd4fc
diff --git a/.checkstyle b/.checkstylenew file mode 100644index 000000000..d7cb5e4da--- /dev/null+++ b/.checkstyle@@ -0,0 +1,8 @@+<?xml version="1.0" encoding="UTF-8"?>++<fileset-config file-format-version="1.2.0" simple-config="false">+ <local-check-config name="easy" location="internal_config__1246313062720.xml" type="internal" description=""/>+ <fileset name="all" enabled="true" check-config-name="Sun Checks" local="false">+ <file-match-pattern match-pattern="." include-pattern="true"/>+ </fileset>+</fileset-config>diff --git a/source/de/anomic/content/DCEntry.java b/source/de/anomic/content/DCEntry.javaindex 9c8745b69..90a67b94b 100644--- a/source/de/anomic/content/DCEntry.java+++ b/source/de/anomic/content/DCEntry.java@@ -118,7 +118,8 @@ public class DCEntry extends TreeMap<String, String> {public String language() {String l = this.get("language");if (l == null) l = this.get("dc:language");- if (l == null) return url().language(); else return l;+ if (l == null) return url().language();+ return l;}public String title() {diff --git a/source/de/anomic/crawler/IndexingStack.java b/source/de/anomic/crawler/IndexingStack.javaindex 604de3345..cc85fafac 100644--- a/source/de/anomic/crawler/IndexingStack.java+++ b/source/de/anomic/crawler/IndexingStack.java@@ -114,9 +114,9 @@ public class IndexingStack {}if (sbQueueStack.size() < sizeBefore) {return new QueueEntry(b);- } else {- Log.logSevere("IndexingStack", "sbQueueStack " + sbQueueStack.filename + " does not shrink after pot() != null; trying pop()");}+ Log.logSevere("IndexingStack", "sbQueueStack " + sbQueueStack.filename + " does not shrink after pot() != null; trying pop()");+sizeBefore = sbQueueStack.size();b = sbQueueStack.pop();if (b == null) {diff --git a/source/de/anomic/http/httpRequestHeader.java b/source/de/anomic/http/httpRequestHeader.javaindex 5a7670595..ff977f16e 100755--- a/source/de/anomic/http/httpRequestHeader.java+++ b/source/de/anomic/http/httpRequestHeader.java@@ -37,9 +37,6 @@ import de.anomic.server.serverCore;public class httpRequestHeader extends httpHeader {// request header properties- public static final String ACCEPT = "Accept";- public static final String ACCEPT_CHARSET = "Accept-Charset";- public static final String ACCEPT_LANGUAGE = "Accept-Language";public static final String CONNECTION = "Connection";public static final String PROXY_CONNECTION = "Proxy-Connection";@@ -58,7 +55,6 @@ public class httpRequestHeader extends httpHeader {public static final String COOKIE = "Cookie";- public static final String ACCEPT_ENCODING = "Accept-Encoding";public static final String IF_MODIFIED_SINCE = "If-Modified-Since";public static final String IF_RANGE = "If-Range";public static final String REFERER = "Referer";diff --git a/source/de/anomic/kelondro/blob/ArrayStack.java b/source/de/anomic/kelondro/blob/ArrayStack.javaindex 813a6e047..b9bd33503 100755--- a/source/de/anomic/kelondro/blob/ArrayStack.java+++ b/source/de/anomic/kelondro/blob/ArrayStack.java@@ -460,7 +460,7 @@ public class ArrayStack implements BLOB {* @throws IOException*/public synchronized CloneableIterator<byte[]> keys(boolean up, boolean rotating) throws IOException {- assert rotating = false;+ assert rotating == false;final List<CloneableIterator<byte[]>> c = new ArrayList<CloneableIterator<byte[]>>(blobs.size());final Iterator<blobItem> i = blobs.iterator();while (i.hasNext()) {@@ -726,11 +726,10 @@ public class ArrayStack implements BLOB {FileUtils.deletedelete(f1);if (f2.renameTo(newFile)) return newFile;return f2;- } else {- FileUtils.deletedelete(f1);- FileUtils.deletedelete(f2);- return null;}+ FileUtils.deletedelete(f1);+ FileUtils.deletedelete(f2);+ return null;} else if (!i2.hasNext()) {FileUtils.deletedelete(f2);if (f1.renameTo(newFile)) return newFile;diff --git a/source/de/anomic/kelondro/index/HandleMap.java b/source/de/anomic/kelondro/index/HandleMap.javaindex 0868a05bd..df7d5c823 100644--- a/source/de/anomic/kelondro/index/HandleMap.java+++ b/source/de/anomic/kelondro/index/HandleMap.java@@ -206,12 +206,11 @@ public class HandleMap implements Iterable<Row.Entry> {newentry.setCol(1, a);index.addUnique(newentry);return 1;- } else {- long i = indexentry.getColLong(1) + a;- indexentry.setCol(1, i);- index.put(indexentry);- return i;}+ long i = indexentry.getColLong(1) + a;+ indexentry.setCol(1, i);+ index.put(indexentry);+ return i;}public synchronized long inc(final byte[] key) {diff --git a/source/de/anomic/kelondro/util/FileUtils.java b/source/de/anomic/kelondro/util/FileUtils.javaindex c8dcb4974..406d39d6e 100644--- a/source/de/anomic/kelondro/util/FileUtils.java+++ b/source/de/anomic/kelondro/util/FileUtils.java@@ -264,12 +264,11 @@ public final class FileUtils {return bb;}return b;- } else {- final ByteArrayOutputStream baos = new ByteArrayOutputStream(512);- copy(source, baos, count);- baos.close();- return baos.toByteArray();}+ final ByteArrayOutputStream baos = new ByteArrayOutputStream(512);+ copy(source, baos, count);+ baos.close();+ return baos.toByteArray();}public static byte[] read(final File source) throws IOException {diff --git a/source/de/anomic/net/UPnP.java b/source/de/anomic/net/UPnP.javaindex c65a1ad66..83532d338 100644--- a/source/de/anomic/net/UPnP.java+++ b/source/de/anomic/net/UPnP.java@@ -178,8 +178,6 @@ public class UPnP {}private static class Handler implements DiscoveryEventHandler {-- private final Log log = UPnP.log;public void eventSSDPAlive(String usn, String udn, String nt, String maxAge, URL location) {InternetGatewayDevice[] newIGD = { null };diff --git a/source/de/anomic/plasma/parser/Condenser.java b/source/de/anomic/plasma/parser/Condenser.javaindex 68a2c665c..70c748ded 100644--- a/source/de/anomic/plasma/parser/Condenser.java+++ b/source/de/anomic/plasma/parser/Condenser.java@@ -481,17 +481,17 @@ public final class Condenser {public final static boolean invisible(final char c) {final int type = Character.getType(c);- if(- (type == Character.LOWERCASE_LETTER)- || (type == Character.DECIMAL_DIGIT_NUMBER)- || (type == Character.UPPERCASE_LETTER)- || (type == Character.MODIFIER_LETTER)- || (type == Character.OTHER_LETTER)- || (type == Character.TITLECASE_LETTER)- || (htmlFilterContentScraper.punctuation(c)))+ if (+ (type == Character.LOWERCASE_LETTER)+ || (type == Character.DECIMAL_DIGIT_NUMBER)+ || (type == Character.UPPERCASE_LETTER)+ || (type == Character.MODIFIER_LETTER)+ || (type == Character.OTHER_LETTER)+ || (type == Character.TITLECASE_LETTER)+ || (htmlFilterContentScraper.punctuation(c))) {return false;- else- return true;+ }+ return true;}public static Enumeration<StringBuilder> wordTokenizer(final String s, final String charset) {diff --git a/source/de/anomic/yacy/dht/Dispatcher.java b/source/de/anomic/yacy/dht/Dispatcher.javaindex 9ae739a07..9ff5871fa 100755--- a/source/de/anomic/yacy/dht/Dispatcher.java+++ b/source/de/anomic/yacy/dht/Dispatcher.java@@ -377,11 +377,10 @@ public class Dispatcher {return null;}return chunk;- } else {- this.log.logInfo("STORE: Chunk " + new String(chunk.primaryTarget()) + " has not enough targets left. This transmission has failed, putting back index to backend");- chunk.restore();- return null;}+ this.log.logInfo("STORE: Chunk " + new String(chunk.primaryTarget()) + " has not enough targets left. This transmission has failed, putting back index to backend");+ chunk.restore();+ return null;}public void close() {