You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Divij Vaidya (Jira)" <ji...@apache.org> on 2022/05/23 09:53:00 UTC
[jira] [Created] (KAFKA-13929) Replace File.createNewFile() with Files.createFile()
Divij Vaidya created KAFKA-13929:
------------------------------------
Summary: Replace File.createNewFile() with Files.createFile()
Key: KAFKA-13929
URL: https://issues.apache.org/jira/browse/KAFKA-13929
Project: Kafka
Issue Type: Sub-task
Reporter: Divij Vaidya
Assignee: Divij Vaidya
File.createNewFile() returns a boolean signifying whether the file creation was successful or not.
There are multiple places in the Kafka code base where we are not checking the value of the returned boolean.
Replacing it with the Files.createFile() API will decrease the chances of inadvertent bugs in the code base since Files.createFile() API thrown exceptions when the creation is not successful.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)