classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Patch: ZipFile.getInputStream shouldn't throw NoSuchElement.


From: David Holmes
Subject: RE: Patch: ZipFile.getInputStream shouldn't throw NoSuchElement.
Date: Wed, 9 Jun 2004 16:08:49 +1000

Anthony Green wrote:
> ZipFile.getInputStream shouldn't be throwing NoSuchElement exceptions.
> It should be returning null instead.

Neither behaviour is specified for this method, though it would be
compatible with Sun's implementation to return null.

If the ZipEntry is not for an entry in the current zip file you could also
throw an IOException - specifically FileNotFoundException. That would seem
more correct to me. Or even just a ZipException - also correct.

Returning null seems incorrect.

David Holmes





reply via email to

[Prev in Thread] Current Thread [Next in Thread]