Re: FYI: close() after finish() behaviour in BZip2CompressorOutputStream changed from 1.27.1 to 1.28.0

Gary Gregory <[email protected]> Wed, 31 Dec 2025 10:31:35 -0500
Newsgroups gmane.comp.jakarta.commons.user
Message-ID <CACZkXPzKQ_MAnEN0oOOEvX6p5nOF7iYMs_CshyHJBrdUE3iApA@mail.gmail.com>
Hello Oti,

Thank you for your report.

Please test this fix for your use case:

https://github.com/apache/commons-compress/pull/757

Gary

On Wed, Dec 31, 2025 at 9:51=E2=80=AFAM Oti <[email protected]> wrote:
>
> Hello
>
> This is just to let you know that calling close() after finish() on a
> BZip2CompressorOutputStream leads to a
>
> java.lang.NullPointerException: Cannot read field "inUse" because
> "dataShadow" is null
>
>
> This used to pass silently on 1.27.1.
>
> It is probably called bad style, but I found a project that had to remove
> the close() calls after finish(). (
> https://github.com/BisonSchweizAG/jython/pull/33).
>
>
>
> Keep on the good work, and best wishes!
>
> Oti.