You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Mark Hindess <ma...@googlemail.com> on 2009/10/12 00:15:09 UTC
[classlib] Merge of trunk to java6 and zip behaviour change
I've merged trunk to java6 at r824184. I see one additional test failure:
org.apache.harmony.archive.tests.java.util.zip.InflaterOutputStreamTest
due to the change in "HARMONY-6346 Several archive bugfixes and optimizations".
This test passes on the RI but fails on Harmony as:
InflaterOutputStream.write(-1);
no longer throws a ZipException. Jesse described this behaviour change
so this failure is not unexpected but are we happy to just remove this
test? Should we record the non-bug difference in a JIRA?
Regards,
Mark.
Re: [classlib] Merge of trunk to java6 and zip behaviour change
Posted by Mark Hindess <ma...@googlemail.com>.
In message <a4...@mail.gmail.com>,
Jesse Wilson writes:
>
> On Sun, Oct 11, 2009 at 3:15 PM, Mark Hindess
> <ma...@googlemail.com> wrote:
>
> > due to the change in "HARMONY-6346 Several archive bugfixes and
> > optimizations".
> > This test passes on the RI but fails on Harmony as:
> >
> > InflaterOutputStream.write(-1);
> >
> > no longer throws a ZipException. Jesse described this behaviour change
> > so this failure is not unexpected but are we happy to just remove this
> > test? Should we record the non-bug difference in a JIRA?
> >
>
> I spent a long time investigating this. I read through the zlib spec plus
> some implementation code. I was pretty anxious about being incompatibile
> with the JRE, but surprised because I couldn't get raw zlib to detect the
> issue. It accepted -1 just fine, failing on the byte that followed. All 3
> implementations fail on the 3-byte sequence {-1, -1, -1}.
>
> Since we're compatible with zlib, I don't think there's a problem with
> Harmony's implementation. To verify this, create a program (or modify
> zpipe.c <http://www.zlib.net/zpipe.c>) to see how zlib behaves when asked to
> inflate {-1}.
This seems reasonable. I've created a JIRA to make sure this is recorded
(HARMONY-6350) and removed the test in r824241.
-Mark.
Re: [classlib] Merge of trunk to java6 and zip behaviour change
Posted by Jesse Wilson <je...@google.com>.
On Sun, Oct 11, 2009 at 3:15 PM, Mark Hindess
<ma...@googlemail.com>wrote:
> due to the change in "HARMONY-6346 Several archive bugfixes and
> optimizations".
> This test passes on the RI but fails on Harmony as:
>
> InflaterOutputStream.write(-1);
>
> no longer throws a ZipException. Jesse described this behaviour change
> so this failure is not unexpected but are we happy to just remove this
> test? Should we record the non-bug difference in a JIRA?
>
I spent a long time investigating this. I read through the zlib spec plus
some implementation code. I was pretty anxious about being incompatibile
with the JRE, but surprised because I couldn't get raw zlib to detect the
issue. It accepted -1 just fine, failing on the byte that followed. All 3
implementations fail on the 3-byte sequence {-1, -1, -1}.
Since we're compatible with zlib, I don't think there's a problem with
Harmony's implementation. To verify this, create a program (or modify
zpipe.c <http://www.zlib.net/zpipe.c>) to see how zlib behaves when asked to
inflate {-1}.