Bug 54938 - WorkbookFactory.create(InputStream) throws IllegalArgumentException, not InvalidFormatException
Summary: WorkbookFactory.create(InputStream) throws IllegalArgumentException, not Inva...
Alias: None
Product: POI
Classification: Unclassified
Component: POI Overall (show other bugs)
Version: 3.9-FINAL
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2013-05-08 14:16 UTC by apache
Modified: 2015-08-17 20:56 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description apache 2013-05-08 14:16:21 UTC
As in the subject: org.apachi.poi.ss.usermodel.WorkbookFactory, line 75.

In my opinion this should throw an InvalidFormatException since the latter is a traced exception, and "input file of unrecognised format" is probably an error that should be handled.
Comment 1 Dominik Stadler 2015-08-17 20:56:14 UTC
In r1696338 we changed the throw to InvalidFormatException() as this is documented in the javadoc section of these methods so it makes sense to throw this exception in these cases as well.