On Sun, Oct 11, 2009 at 3:15 PM, Mark Hindess
<mark.hind...@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}.

Reply via email to