Skip to content

Commit

Permalink
Remove call to System.clearProperty("sun.font.fontmanager");
Browse files Browse the repository at this point in the history
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 elastic#174.
(cherry picked from commit eacb040)
  • Loading branch information
dadoonet committed Oct 23, 2015
1 parent 64983c7 commit d110369
Showing 1 changed file with 0 additions and 4 deletions.
Expand Up @@ -496,10 +496,6 @@ public Mapper parse(ParseContext context) throws IOException {
// 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);
Expand Down

0 comments on commit d110369

Please sign in to comment.