branch develop updated (a1f18cf -> 495a743)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository nuiton-utils. See http://git.nuiton.org/nuiton-utils.git from a1f18cf [jgitflow-maven-plugin]Updating develop poms back to pre merge state new 495a743 fixes #3195: FileUtil#createDirectoryIfNecessary is not thread safe The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 495a743b6205d4434ec1b2b3586e35ee44538c7d Author: Eric Chatellier <chatellier@codelutin.com> Date: Wed Dec 9 10:19:07 2015 +0100 fixes #3195: FileUtil#createDirectoryIfNecessary is not thread safe Summary of changes: src/main/java/org/nuiton/util/FileUtil.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository nuiton-utils. See http://git.nuiton.org/nuiton-utils.git commit 495a743b6205d4434ec1b2b3586e35ee44538c7d Author: Eric Chatellier <chatellier@codelutin.com> Date: Wed Dec 9 10:19:07 2015 +0100 fixes #3195: FileUtil#createDirectoryIfNecessary is not thread safe --- src/main/java/org/nuiton/util/FileUtil.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/nuiton/util/FileUtil.java b/src/main/java/org/nuiton/util/FileUtil.java index ae6c259..e430719 100644 --- a/src/main/java/org/nuiton/util/FileUtil.java +++ b/src/main/java/org/nuiton/util/FileUtil.java @@ -1263,11 +1263,8 @@ public class FileUtil { // FileUtil public static boolean createDirectoryIfNecessary(File dir) throws IOException { if (!dir.exists()) { - boolean b = dir.mkdirs(); - if (!b) { - throw new IOException("Could not create directory " + dir); - } - return true; + // do not throw exception if directory was created by another thread + return dir.mkdirs(); } return false; } -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
participants (1)
-
nuiton.org scm