Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
skip creation of unused Bluelist contenttransformer
reger28456dfc09c2
diff --git a/source/net/yacy/document/parser/html/AbstractTransformer.java b/source/net/yacy/document/parser/html/AbstractTransformer.javaindex 370d277e6..e1850c78d 100644--- a/source/net/yacy/document/parser/html/AbstractTransformer.java+++ b/source/net/yacy/document/parser/html/AbstractTransformer.java@@ -26,6 +26,8 @@ package net.yacy.document.parser.html;import java.util.TreeSet;+@Deprecated+// TODO: delete candidate, because not in use, (noticed 2014-12-02)public abstract class AbstractTransformer implements Transformer {private TreeSet<String> tags0;@@ -65,9 +67,9 @@ public abstract class AbstractTransformer implements Transformer {public char[] transformTag1(final ContentScraper.Tag tag, final char quotechar) {return TransformerWriter.genTag1(tag.name, tag.opts, tag.content.getChars(), quotechar);}-+@Override- public synchronized void close() {+ public synchronized void close() {// free resourcesthis.tags0 = null;this.tags1 = null;diff --git a/source/net/yacy/document/parser/html/ContentTransformer.java b/source/net/yacy/document/parser/html/ContentTransformer.javaindex 5b6fd8252..d20be732e 100644--- a/source/net/yacy/document/parser/html/ContentTransformer.java+++ b/source/net/yacy/document/parser/html/ContentTransformer.java@@ -34,6 +34,8 @@ import java.util.TreeSet;import net.yacy.cora.document.encoding.ASCII;import net.yacy.kelondro.io.CharBuffer;+@Deprecated+// TODO: delete candidate, because not in use, (noticed 2014-12-02)public class ContentTransformer extends AbstractTransformer implements Transformer {// statics: for initialization of the HTMLFilterAbstractTransformer@@ -143,4 +145,4 @@ public class ContentTransformer extends AbstractTransformer implements Transformsuper.close();}-}+}diff --git a/source/net/yacy/document/parser/html/TransformerWriter.java b/source/net/yacy/document/parser/html/TransformerWriter.javaindex 408322dcb..966109a8a 100644--- a/source/net/yacy/document/parser/html/TransformerWriter.java+++ b/source/net/yacy/document/parser/html/TransformerWriter.java@@ -542,30 +542,4 @@ public final class TransformerWriter extends Writer {return !this.binaryUnsuspect;}- public static void main(final String[] args) {- // takes one argument: a file name- if (args.length != 1) return;- // TODO: this does not work at the moment- System.out.println("this does not work at the moment");- System.exit(0);- final char[] buffer = new char[512];- try {- final ContentScraper scraper = new ContentScraper(new DigestURL("http://localhost:8090"), 1000);- final Transformer transformer = new ContentTransformer();- final Reader is = new FileReader(args[0]);- final FileOutputStream fos = new FileOutputStream(new File(args[0] + ".out"));- final Writer os = new TransformerWriter(fos, UTF8.charset, scraper, transformer, false);- int i;- while ((i = is.read(buffer)) > 0) os.write(buffer, 0, i);- os.close();- fos.close();- is.close();- scraper.print();- } catch (final MalformedURLException e) {- ConcurrentLog.logException(e);- } catch (final IOException e) {- ConcurrentLog.logException(e);- }- }-}\ No newline at end of filediff --git a/source/net/yacy/server/http/HTTPDProxyHandler.java b/source/net/yacy/server/http/HTTPDProxyHandler.javaindex ff8dcdfa8..c38ad62f6 100644--- a/source/net/yacy/server/http/HTTPDProxyHandler.java+++ b/source/net/yacy/server/http/HTTPDProxyHandler.java@@ -79,14 +79,11 @@ import net.yacy.crawler.data.Cache;import net.yacy.crawler.retrieval.Request;import net.yacy.crawler.retrieval.Response;import net.yacy.document.TextParser;-import net.yacy.document.parser.html.ContentTransformer;-import net.yacy.document.parser.html.Transformer;import net.yacy.kelondro.io.ByteCountOutputStream;import net.yacy.kelondro.util.FileUtils;import net.yacy.peers.operation.yacyBuildProperties;import net.yacy.repository.Blacklist.BlacklistType;import net.yacy.search.Switchboard;-import net.yacy.search.SwitchboardConstants;import net.yacy.server.serverObjects;public final class HTTPDProxyHandler {@@ -104,8 +101,6 @@ public final class HTTPDProxyHandler {private static PrintWriter redirectorWriter = null;private static BufferedReader redirectorReader = null;- private static Transformer transformer = null;-//private Properties connectionProperties = null;// creating a loggerprivate static final ConcurrentLog log = new ConcurrentLog("PROXY");@@ -168,10 +163,6 @@ public final class HTTPDProxyHandler {log.severe("Unable to configure proxy access logging.",e);}- // load a transformer- transformer = new ContentTransformer();- transformer.init(new File(sb.getAppPath(), sb.getConfig(SwitchboardConstants.LIST_BLUE, "")).toString());-// load the yellow-listfinal String f = sb.getConfig("proxyYellowList", null);if (f != null) {