You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Oti <oh...@gmail.com> on 2025/12/30 13:20:09 UTC

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

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.

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

Posted by Oti <oh...@gmail.com>.
Hi Gary

I tested with commons-compress-1.29.0-20260113.140126-64.jar (from
https://repository.apache.org/content/repositories/snapshots/org/apache/commons/commons-compress/1.29.0-SNAPSHOT/),
and I can happily confirm that my use case again works with the latest
snapshot.

Thanks very much for the quick response and fix!
Best wishes
Oti.

On Tue, Jan 13, 2026 at 2:09 PM Gary Gregory <ga...@gmail.com> wrote:

> 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 AM Gary Gregory <ga...@gmail.com>
> 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 AM Oti <oh...@gmail.com> 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.
>

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

Posted by Gary Gregory <ga...@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 AM Gary Gregory <ga...@gmail.com> 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 AM Oti <oh...@gmail.com> 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.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


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

Posted by Gary Gregory <ga...@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 AM Oti <oh...@gmail.com> 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.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org