This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-configuration.git
The following commit(s) were added to refs/heads/master by this push: new eaa3434 Use try-with-resources. eaa3434 is described below commit eaa3434ece1bbde0bc0524d55b214db32f852532 Author: Gary Gregory <gardgreg...@gmail.com> AuthorDate: Tue Sep 10 23:01:52 2019 -0400 Use try-with-resources. --- .../reloading/TestVFSFileHandlerReloadingDetector.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/java/org/apache/commons/configuration2/reloading/TestVFSFileHandlerReloadingDetector.java b/src/test/java/org/apache/commons/configuration2/reloading/TestVFSFileHandlerReloadingDetector.java index b843824..78ee00b 100644 --- a/src/test/java/org/apache/commons/configuration2/reloading/TestVFSFileHandlerReloadingDetector.java +++ b/src/test/java/org/apache/commons/configuration2/reloading/TestVFSFileHandlerReloadingDetector.java @@ -63,9 +63,9 @@ public class TestVFSFileHandlerReloadingDetector */ private void writeTestFile(final File file, final String value) throws IOException { - final FileWriter out = new FileWriter(file); - out.write(String.format(FMT_XML, value)); - out.close(); + try (final FileWriter out = new FileWriter(file)) { + out.write(String.format(FMT_XML, value)); + } } /**