helix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "bd2019us (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HELIX-815) File.mkdir() may fail and cause crash.
Date Sun, 31 Mar 2019 19:37:00 GMT
bd2019us created HELIX-815:
------------------------------

             Summary: File.mkdir() may fail and cause crash.
                 Key: HELIX-815
                 URL: https://issues.apache.org/jira/browse/HELIX-815
             Project: Apache Helix
          Issue Type: Bug
          Components: helix-core
            Reporter: bd2019us


Location: helix-core/src/main/java/org/apache/helix/tools/commandtools/ZkGrep.java: 584

The File.mkdir() API requires the parent directory have to exist, otherwise a failure will
occur. To ensure the safety of file creation, the File.mkdirs() is preferred as it will create
the parent directory as well if needed. This is important as if it fail, program may potentially
crash. Besides, mkdirs() causes no extra overhead.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message