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

Gary Gregory <[email protected]> Tue, 13 Jan 2026 08:09:30 -0500
Newsgroups gmane.comp.jakarta.commons.user
Message-ID <CACZkXPyG9=RRmLs1ihUY_9GMiij4QSnuVViqUTLpA2_1u05+ow@mail.gmail.com>
Hello Oti,

I merged the PR, please test git master or a 1.29-SNAPSHOT build from
the Maven snapshot repository
https://repository.apache.org/content/repositories/snapshots/

Thank you,
Gary

On Wed, Dec 31, 2025 at 10:31=E2=80=AFAM Gary Gregory <[email protected]=
om> wrote:
>
> 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 remo=
ve
> > the close() calls after finish(). (
> > https://github.com/BisonSchweizAG/jython/pull/33).
> >
> >
> >
> > Keep on the good work, and best wishes!
> >
> > Oti.