I'd always use resource.release()/close() directly, unless you can't throw IOException and you don't want to wrap it, in which case I'd use ResourceUtils.releaseOrLog()/closeOrLog()