mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
problems with code style
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6153 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
parent
adf01c676e
commit
93dfb51fd4
8
.checkstyle
Normal file
8
.checkstyle
Normal file
|
@ -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>
|
|
@ -118,7 +118,8 @@ public class DCEntry extends TreeMap<String, String> {
|
||||||
public String language() {
|
public String language() {
|
||||||
String l = this.get("language");
|
String l = this.get("language");
|
||||||
if (l == null) l = this.get("dc: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() {
|
public String title() {
|
||||||
|
|
|
@ -114,9 +114,9 @@ public class IndexingStack {
|
||||||
}
|
}
|
||||||
if (sbQueueStack.size() < sizeBefore) {
|
if (sbQueueStack.size() < sizeBefore) {
|
||||||
return new QueueEntry(b);
|
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();
|
sizeBefore = sbQueueStack.size();
|
||||||
b = sbQueueStack.pop();
|
b = sbQueueStack.pop();
|
||||||
if (b == null) {
|
if (b == null) {
|
||||||
|
|
|
@ -37,9 +37,6 @@ import de.anomic.server.serverCore;
|
||||||
public class httpRequestHeader extends httpHeader {
|
public class httpRequestHeader extends httpHeader {
|
||||||
|
|
||||||
// request header properties
|
// 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 CONNECTION = "Connection";
|
||||||
public static final String PROXY_CONNECTION = "Proxy-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 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_MODIFIED_SINCE = "If-Modified-Since";
|
||||||
public static final String IF_RANGE = "If-Range";
|
public static final String IF_RANGE = "If-Range";
|
||||||
public static final String REFERER = "Referer";
|
public static final String REFERER = "Referer";
|
||||||
|
|
|
@ -460,7 +460,7 @@ public class ArrayStack implements BLOB {
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
public synchronized CloneableIterator<byte[]> keys(boolean up, boolean rotating) 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 List<CloneableIterator<byte[]>> c = new ArrayList<CloneableIterator<byte[]>>(blobs.size());
|
||||||
final Iterator<blobItem> i = blobs.iterator();
|
final Iterator<blobItem> i = blobs.iterator();
|
||||||
while (i.hasNext()) {
|
while (i.hasNext()) {
|
||||||
|
@ -726,11 +726,10 @@ public class ArrayStack implements BLOB {
|
||||||
FileUtils.deletedelete(f1);
|
FileUtils.deletedelete(f1);
|
||||||
if (f2.renameTo(newFile)) return newFile;
|
if (f2.renameTo(newFile)) return newFile;
|
||||||
return f2;
|
return f2;
|
||||||
} else {
|
}
|
||||||
FileUtils.deletedelete(f1);
|
FileUtils.deletedelete(f1);
|
||||||
FileUtils.deletedelete(f2);
|
FileUtils.deletedelete(f2);
|
||||||
return null;
|
return null;
|
||||||
}
|
|
||||||
} else if (!i2.hasNext()) {
|
} else if (!i2.hasNext()) {
|
||||||
FileUtils.deletedelete(f2);
|
FileUtils.deletedelete(f2);
|
||||||
if (f1.renameTo(newFile)) return newFile;
|
if (f1.renameTo(newFile)) return newFile;
|
||||||
|
|
|
@ -206,13 +206,12 @@ public class HandleMap implements Iterable<Row.Entry> {
|
||||||
newentry.setCol(1, a);
|
newentry.setCol(1, a);
|
||||||
index.addUnique(newentry);
|
index.addUnique(newentry);
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
}
|
||||||
long i = indexentry.getColLong(1) + a;
|
long i = indexentry.getColLong(1) + a;
|
||||||
indexentry.setCol(1, i);
|
indexentry.setCol(1, i);
|
||||||
index.put(indexentry);
|
index.put(indexentry);
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public synchronized long inc(final byte[] key) {
|
public synchronized long inc(final byte[] key) {
|
||||||
return add(key, 1);
|
return add(key, 1);
|
||||||
|
|
|
@ -264,13 +264,12 @@ public final class FileUtils {
|
||||||
return bb;
|
return bb;
|
||||||
}
|
}
|
||||||
return b;
|
return b;
|
||||||
} else {
|
}
|
||||||
final ByteArrayOutputStream baos = new ByteArrayOutputStream(512);
|
final ByteArrayOutputStream baos = new ByteArrayOutputStream(512);
|
||||||
copy(source, baos, count);
|
copy(source, baos, count);
|
||||||
baos.close();
|
baos.close();
|
||||||
return baos.toByteArray();
|
return baos.toByteArray();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public static byte[] read(final File source) throws IOException {
|
public static byte[] read(final File source) throws IOException {
|
||||||
final byte[] buffer = new byte[(int) source.length()];
|
final byte[] buffer = new byte[(int) source.length()];
|
||||||
|
|
|
@ -179,8 +179,6 @@ public class UPnP {
|
||||||
|
|
||||||
private static class Handler implements DiscoveryEventHandler {
|
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) {
|
public void eventSSDPAlive(String usn, String udn, String nt, String maxAge, URL location) {
|
||||||
InternetGatewayDevice[] newIGD = { null };
|
InternetGatewayDevice[] newIGD = { null };
|
||||||
boolean error = false;
|
boolean error = false;
|
||||||
|
|
|
@ -488,9 +488,9 @@ public final class Condenser {
|
||||||
|| (type == Character.MODIFIER_LETTER)
|
|| (type == Character.MODIFIER_LETTER)
|
||||||
|| (type == Character.OTHER_LETTER)
|
|| (type == Character.OTHER_LETTER)
|
||||||
|| (type == Character.TITLECASE_LETTER)
|
|| (type == Character.TITLECASE_LETTER)
|
||||||
|| (htmlFilterContentScraper.punctuation(c)))
|
|| (htmlFilterContentScraper.punctuation(c))) {
|
||||||
return false;
|
return false;
|
||||||
else
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -377,12 +377,11 @@ public class Dispatcher {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return chunk;
|
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");
|
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();
|
chunk.restore();
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public void close() {
|
public void close() {
|
||||||
// removes all entries from the dispatcher and puts them back to a RAMRI
|
// removes all entries from the dispatcher and puts them back to a RAMRI
|
||||||
|
|
Loading…
Reference in New Issue
Block a user