File tree Expand file tree Collapse file tree
cayenne-ant/src/test/java/org/apache/cayenne/tools Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -175,9 +175,10 @@ private void cleanDb(DbImportConfiguration dbImportConfiguration) throws Excepti
175175
176176 @ SuppressWarnings ("unchecked" )
177177 private void verifyResult (File map , File mapFileCopy ) throws IOException {
178- FileReader control = new FileReader (map .getAbsolutePath () + "-result" );
179- FileReader test = new FileReader (mapFileCopy );
180- assertThat (test , CompareMatcher .isSimilarTo (control ).ignoreWhitespace ());
178+ try (FileReader control = new FileReader (map .getAbsolutePath () + "-result" );
179+ FileReader test = new FileReader (mapFileCopy )) {
180+ assertThat (test , CompareMatcher .isSimilarTo (control ).ignoreWhitespace ());
181+ }
181182 }
182183
183184 private void prepareDatabase (String sqlFile , DbImportConfiguration dbImportConfiguration ) throws Exception {
You can’t perform that action at this time.
0 commit comments