Use Java 7's autoclosable syntax instead of try/finally