commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "hrjk" <har...@zeniitti.net>
Subject [commons vfs] Considering empty (zip) packages
Date Tue, 30 May 2006 12:05:24 GMT
Hi.

What's the correct handling of empty, but otherwise correct packages? It
seems like currently these (for zip packages atleast) are handled by
throwing FileSystemException and error "Could not open Zip file ...".

Errors start to flow from java.util.zip:
...
Caused by: java.util.zip.ZipException: error in opening zip file
	at java.util.zip.ZipFile.open(Native Method)
	at java.util.zip.ZipFile.<init>(Unknown Source)
	at java.util.zip.ZipFile.<init>(Unknown Source)
	at
org.apache.commons.vfs.provider.zip.ZipFileSystem.createZipFile(ZipFileSystem.java:153)
	... 11 more

I know this issue is rather strange, why should anyone create empty zip
package. But if this case should occur for some reason, is the exception
correct way of handling things? I think that the package should be opened
without exceptions, though there is nothing to be read.

Or do you strongly disagree? :)

BR,
-hrjk


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message