harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Ellison <t.p.elli...@gmail.com>
Subject [classlib][archive] Re: Delayed entry parsing Was: [classlib][luni] optimized InputStream reader (HARMONY-5522)
Date Tue, 18 Mar 2008 11:13:07 GMT
Alexei Fedotov wrote:
> I was thinking about delaying parsing of Manifest entries to get even
> more speed up while merging Tim's inlinable ByteStream (it is called
> ByteSnapshot now) and faced a design choice. Manifest#getEntries() is
> not reported to throw IOException. It means that if I delay parsing
> entries till this call and get a parse error, I can no longer throw
> conventional IOException.

Although you are deferring the parsing, I assume you throw an 
IOException if the manifest stream is not readable?

> What should I do?
> 1. Throw new RuntimeException
> 2. Set all entries to null (and probably get NPE very soon)
> 3. Ignore a particular attribute (name: value) with a parsing error as
> specification might be suggesting [1]
> 4. Parse entries during read() method / constructor invocation as RI does.

What does the RI do if the manifest is readable, but not parsable?  Does 
it throw an IOException?

Regards,
Tim

> Suggestions?
> 
> [1] http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html, search for
> "Attributes which are not understood are ignored."


Mime
View raw message