amiqat / osmdroid

Automatically exported from code.google.com/p/osmdroid
0 stars 0 forks source link

Exception Handling with Zip Files #268

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Open a corrupt Zip File with ArchiveFileFactory.getArchiveFile()

What is the expected output? What do you see instead?
Expected is the file or null or -1. Instead the app crashes with Exception (in 
my case java.util.zip.ZipException: EOCD not found; not a Zip archive?) . 
Please include throws at getArchiveFile or handel the exception and return a 
failure.

What version of the product are you using? On what operating system?
3.0.6

Please provide any additional information below.

Original issue reported on code.google.com by abzy...@gmail.com on 17 Oct 2011 at 9:17

GoogleCodeExporter commented 8 years ago
It logs the error and ignores the file. Where would you like to handle the 
exception?

Original comment by neilboyd on 17 Oct 2011 at 8:14

GoogleCodeExporter commented 8 years ago
ok i'm sorry for that. my mistake. was a nullPointer Exception but when looking 
at the log file i must have seen the log output for the caught ZipException. 
null is fine as return. just didn't catch the null value in my app.

Original comment by abzy...@gmail.com on 18 Oct 2011 at 8:53

GoogleCodeExporter commented 8 years ago
Okay, I'll close it then.

Original comment by neilboyd on 18 Oct 2011 at 9:35