[
https://issues.apache.org/jira/browse/TIKA-775?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13532205#comment-13532205
]
Jukka Zitting commented on TIKA-775:
------------------------------------
bq. {{ catch (InterruptedException ignore) {
Thread.currentThread().interrupt(); } }}
Resetting the interrupt status of the thread is a good idea when we can't just
re-throw the InterruptedException, but IMHO we should in that case *also* throw
a TikaException to indicate that the requested operation couldn't be completed
normally:
{code}
...
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new TikaException("Interrupted", e);
}
...
{code}
When the {{Process.waitFor()}} call is interrupted we can't just blindly assume
that the process completed normally. Explicitly throwing an exception is a
better approach in such cases.
> Embed Capabilities
> ------------------
>
> Key: TIKA-775
> URL: https://issues.apache.org/jira/browse/TIKA-775
> Project: Tika
> Issue Type: Improvement
> Components: general, metadata
> Affects Versions: 1.0
> Environment: The default ExternalEmbedder requires that sed be
> installed.
> Reporter: Ray Gauss II
> Labels: embed, patch
> Fix For: 1.3
>
> Attachments: embed_20121029.diff, embed.diff,
> tika-core-embed-patch.txt, tika-parsers-embed-patch.txt
>
>
> This patch defines and implements the concept of embedding tika metadata into
> a file stream, the reverse of extraction.
> In the tika-core project an interface defining an Embedder and a generic sed
> ExternalEmbedder implementation meant to be extended or configured are added.
> These classes are essentially a reverse flow of the existing Parser and
> ExternalParser classes.
> In the tika-parsers project an ExternalEmbedderTest unit test is added which
> uses the default ExternalEmbedder (calls sed) to embed a value placed in
> Metadata.DESCRIPTION then verify the operation by parsing the resulting
> stream.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira