We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20a316e commit b7d4f72Copy full SHA for b7d4f72
log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingAppenderCronTest.java
@@ -81,9 +81,9 @@ public void testAppender() throws Exception {
81
fail("No compressed files found");
82
}
83
final Path src = FileSystems.getDefault().getPath("target/test-classes/log4j-rolling-cron2.xml");
84
- final OutputStream os = new FileOutputStream("target/test-classes/log4j-rolling-cron.xml");
85
- Files.copy(src, os);
86
- os.close();
+ try (final OutputStream os = new FileOutputStream("target/test-classes/log4j-rolling-cron.xml")) {
+ Files.copy(src, os);
+ }
87
Thread.sleep(5000);
88
// force a reconfiguration
89
for (int i = 0; i < MAX_TRIES; ++i) {
0 commit comments