From: Olivier Lamy Date: Tue, 22 Apr 2014 02:02:32 +0000 (+1000) Subject: simply use File implementation as we are now 1.7 required X-Git-Tag: archiva-2.1.0~68 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9a09994c8cf6a47a0edf9dda434f3b8cf4140e12;p=archiva.git simply use File implementation as we are now 1.7 required --- diff --git a/archiva-modules/archiva-base/archiva-filelock/src/main/java/org/apache/archiva/common/filelock/DefaultFileLockManager.java b/archiva-modules/archiva-base/archiva-filelock/src/main/java/org/apache/archiva/common/filelock/DefaultFileLockManager.java index 583d3b8af..ee4fb35be 100644 --- a/archiva-modules/archiva-base/archiva-filelock/src/main/java/org/apache/archiva/common/filelock/DefaultFileLockManager.java +++ b/archiva-modules/archiva-base/archiva-filelock/src/main/java/org/apache/archiva/common/filelock/DefaultFileLockManager.java @@ -276,32 +276,7 @@ public class DefaultFileLockManager private boolean mkdirs( File directory ) { - if ( directory == null ) - { - return false; - } - - if ( directory.exists() ) - { - return false; - } - if ( directory.mkdir() ) - { - return true; - } - - File canonDir = null; - try - { - canonDir = directory.getCanonicalFile(); - } - catch ( IOException e ) - { - return false; - } - - File parentDir = canonDir.getParentFile(); - return ( parentDir != null && ( mkdirs( parentDir ) || parentDir.exists() ) && canonDir.mkdir() ); + return directory.mkdirs(); } @Override