Originally posted by Chu Tan: In general (probably universally), it is bad practice to have empty catch blocks. But what do you think of the empty catch statements in the finally block of the below code?
That's fine. There is no expected behavior on failure closing resources. Some people log it or put an //ignore comment so future readers of the code don't think you forgot. Another idea is to put the common close code in a utility class so you only have the empty try/catch logic in one place.