From 3e1e358fdcde6ed75af0ad25ece4a49a2b37f085 Mon Sep 17 00:00:00 2001 From: Michael Peter Christen Date: Wed, 12 Jun 2013 00:17:44 +0200 Subject: [PATCH] calling pdf cache flush on class initialization because calling of the methods during runtime can conflict with dynamic solr class loader and cause a deadlock (seriously!) --- source/net/yacy/document/parser/pdfParser.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/net/yacy/document/parser/pdfParser.java b/source/net/yacy/document/parser/pdfParser.java index 74468b92a..e54b71227 100644 --- a/source/net/yacy/document/parser/pdfParser.java +++ b/source/net/yacy/document/parser/pdfParser.java @@ -78,6 +78,10 @@ public class pdfParser extends AbstractParser implements Parser { this.SUPPORTED_MIME_TYPES.add("text/x-pdf"); } + static { + clean_up_idiotic_PDFParser_font_cache_which_eats_up_tons_of_megabytes(); // must be called here to get that into the class loader; it will block other threads otherwise; + } + @Override public Document[] parse(final DigestURI location, final String mimeType, final String charset, final InputStream source) throws Parser.Failure, InterruptedException {