On 24/Nov/2009 16:11, Jesse Wilson wrote:
> On Tue, Nov 24, 2009 at 6:31 AM, Tim Ellison <[email protected]> wrote:
>
>> Name Tests Errors Failures
>> org.apache.harmony.logging.tests.java.util.logging 13 1 0
>
> This particular failure isn't being reported by Hudson...
I don't see it when running the logging tests again.
I'll keep an eye out for it.
>> org.apache.harmony.sound.tests.javax.sound.sampled 5 3 2
>
> Since my archive change is responsible for this, I spent a while
> investigating it. Unfortunately I haven't had much success; I've never
> looked at the javax.sound API. I'll see what happens to the test's behaviour
> when my change is reverted...
Seems to be caused by a change in the implementation of available() for
InputStreams on Zip entries.
The failing code is in
org.apache.harmony.sound.utils.ProviderService#getProviders(String) when
it tries to read the whole content using available()...
<snip>
InputStream in = urls.nextElement()
.openStream();
bytes = new byte[in.available()];
in.read(bytes);
in.close();
<snip>
Of course, this is bad form, and when I switch to use the old favourite
getAllBytesFromStreamAndClose(InputStream) things start working again.
We can debate whether we should try to improve the available() impl or not.
Regards,
Tim