You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@helix.apache.org by "bd2019us (JIRA)" <ji...@apache.org> on 2019/03/31 19:37:00 UTC

[jira] [Created] (HELIX-815) File.mkdir() may fail and cause crash.

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)