Not really. It's the only way to separate IOExceptions thrown by the close() method from IOExceptions thrown by "actual" code. Still, I prefer the shorter version that does not make the distinction. It looks like Andrey's code but doesn't need the null check:
But the
Java 7 way, with try-with-resources, is even better:
The first line is new syntax, and it will make sure
fis is automatically closed when the try block ends.