Skip to content

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

cleaned; Properties;

(no author)1aa79f5bb5f1
diff --git a/htroot/yacy/list.java b/htroot/yacy/list.java
index 0dc9a2474..040e01ddf 100644
--- a/htroot/yacy/list.java
+++ b/htroot/yacy/list.java
@@ -6,7 +6,10 @@
// Frankfurt, Germany, 2004
//
// This File is contributed by Alexander Schier
-// last change: 18.06.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
@@ -42,11 +45,10 @@
// Contributions and changes to the program code must be marked as such.
// You must compile this file with
-// javac -classpath .:../../Classes list.java
+// javac -classpath .:../../classes list.java
// if the shell's current path is HTROOT
import java.io.File;
-
import de.anomic.data.listManager;
import de.anomic.http.httpHeader;
import de.anomic.server.serverCore;
@@ -56,33 +58,32 @@ import de.anomic.server.serverSwitch;
public class list {
public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch env) {
- // return variable that accumulates replacements
- serverObjects prop = new serverObjects();
- String col = (String) post.get("col", "");
+ // return variable that accumulates replacements
+ final serverObjects prop = new serverObjects();
+ final String col = (String) post.get("col", "");
+
+ final File listsPath = new File(env.getRootPath(),env.getConfig("listsPath", "DATA/LISTS"));
+
+ if (col.equals("black")) {
+ String filename = "";
+ final StringBuffer out = new StringBuffer();
- File listsPath = new File(env.getRootPath(),env.getConfig("listsPath", "DATA/LISTS"));
+ final String filenames=env.getConfig("proxyBlackListsShared", "");
+ final String[] filenamesarray = filenames.split(",");
- if (col.equals("black")) {
- String filename = "";
- String line;
- String out = "";
-
- String filenames=env.getConfig("proxyBlackListsShared", "");
- String filenamesarray[] = filenames.split(",");
+ if(filenamesarray.length >0){
+ for(int i = 0;i <= filenamesarray.length -1; i++){
+ filename = filenamesarray[i];
+ out.append(listManager.getListString(new File(listsPath,filename).toString(), false)).append(serverCore.crlfString);
+ }
+ } // if filenamesarray.length >0
- if(filenamesarray.length >0){
- for(int i = 0;i <= filenamesarray.length -1; i++){
- filename = filenamesarray[i];
- out += listManager.getListString(new File(listsPath,filename).toString(), false) + serverCore.crlfString;
- }
- }//if filenamesarray.length >0
-
- prop.put("list",out);
- } else {
- prop.put("list","");
- }
+ prop.put("list",out);
+ } else {
+ prop.put("list","");
+ }
- return prop;
+ return prop;
}
-}
+}
\ No newline at end of file