Open mvysny opened 10 months ago
Adding an exception would be a breaking change in the hypothetical case that code in some application or 3rd party add-on would directly call that method rather than only using it to create a regular StreamResource
instance.
Describe your motivation
InputStreamFactory.createInputStream()
creates an input stream. Since both reading and creating an input stream may throw IOException, it would be good to add the "throws IOException" clause to thecreateInputStream()
function. For example:This code doesn't compile because
new FileInputStream()
may throw aFileNotFoundException
.Describe the solution you'd like
Change the
createInputStream()
declaration toInputStream createInputStream() throws IOException
.Describe alternatives you've considered
-