Skip to content

Workbook open doesn't declare any possible thrown errors? #227

@mauro-rizzi-DSP

Description

@mauro-rizzi-DSP

So i'm replacing standard poi workbooks with this to avoid a memory issue on my application and I went and replaced the workbook building to

workbook = StreamingReader.builder().open(inputStream);

This was inside a try catch block that would catch an IOException if the file couldn't be opened. Now the class won't compile because the builder open method doesn't declare any possible thrown errors.

This method is opening a file or interpreting an InputStream there's no way it's completely safe and unable to throw errors, why aren't they declared?

EDIT: The exceptions are thrown in the subclass StreamingWorkbookReader but I think they still should be declared as throws in the open methods of the builder

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions