commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Bodewig (JIRA)" <>
Subject [jira] [Commented] (COMPRESS-385) Add detect() to CompressorStreamFactory
Date Tue, 18 Apr 2017 14:48:41 GMT


Stefan Bodewig commented on COMPRESS-385:

[] I've tweaked your patch a little, the only real change is that I now
allow 7z to be detected as well - trying to obtain a stream will still throw an exception,
though. I can imagine that Tika would benefit from detecting a 7z archive as well.

> wouldn't users have gotten a ClassNotFoundException (NoClassDefError?) before if they
had called the 2 parameter createCompressorInputStream; now they're getting a CompressorException.

yes, right, so not only does the message change, the type of exception does as well.

I'm not sure what to make from the test errors you see,
seems to be fine. We probably should try to identify and fix the problem in a different issue.

Many thanks!

> Add detect() to CompressorStreamFactory
> ---------------------------------------
>                 Key: COMPRESS-385
>                 URL:
>             Project: Commons Compress
>          Issue Type: Improvement
>            Reporter: Tim Allison
>            Priority: Minor
>             Fix For: 1.14
> On TIKA-1631, several users have requested that we try to avoid an OOM when a corrupted
Z file is "detected" by CompressorStreamFactory.  
> In Tika, for detection, we're creating the stream via CompressorStreamFactory and then
"detecting" based on what stream was created.  Given that there can be some overhead in creating
the stream and that there can be an OOM for a corrupt Z file, it would be great to add a {{detect(InputStream
is)}} option in CompressorStreamFactory.
> PR on way.

This message was sent by Atlassian JIRA

View raw message