Remove call to System.clearProperty("sun.font.fontmanager");

This has been fixed in Tika 1.8. See https://issues.apache.org/jira/browse/TIKA-1548
We can now remove that call in `AttachmentMapper` class.

Closes #174.
(cherry picked from commit eacb040)
This commit is contained in:
David Pilato 2015-10-23 15:16:07 +02:00
parent 64983c705c
commit d110369968
1 changed files with 0 additions and 4 deletions

View File

@ -496,10 +496,6 @@ public class AttachmentMapper extends FieldMapper {
// Set the maximum length of strings returned by the parseToString method, -1 sets no limit
parsedContent = tika.parseToString(StreamInput.wrap(content), metadata, indexedChars);
} catch (Throwable e) {
// It could happen that Tika adds a System property `sun.font.fontmanager` which should not happen
// TODO Remove when this will be fixed in Tika. See https://issues.apache.org/jira/browse/TIKA-1548
System.clearProperty("sun.font.fontmanager");
// #18: we could ignore errors when Tika does not parse data
if (!ignoreErrors) {
logger.trace("exception caught", e);