mirror of https://github.com/apache/kafka.git
KAFKA-17575 Remove unnecessary file.deleteOnExit call (#17226)
TestUtils.tempDirectory already registers a shutdown hook for deleting the temp directory. There's no reason to also call File.deleteOnExit, since that just registers another hook to do the same thing. Reviewers: TengYao Chi <kitingiao@gmail.com>, Ken Huang <s7133700@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
This commit is contained in:
parent
d063443825
commit
a407cc3a31
|
@ -268,7 +268,6 @@ public class TestUtils {
|
|||
} catch (final IOException ex) {
|
||||
throw new RuntimeException("Failed to create a temp dir", ex);
|
||||
}
|
||||
file.deleteOnExit();
|
||||
|
||||
Exit.addShutdownHook("delete-temp-file-shutdown-hook", () -> {
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue