]> source.dussan.org Git - archiva.git/commitdiff
simply use File implementation as we are now 1.7 required
authorOlivier Lamy <olamy@apache.org>
Tue, 22 Apr 2014 02:02:32 +0000 (12:02 +1000)
committerOlivier Lamy <olamy@apache.org>
Tue, 22 Apr 2014 02:02:32 +0000 (12:02 +1000)
archiva-modules/archiva-base/archiva-filelock/src/main/java/org/apache/archiva/common/filelock/DefaultFileLockManager.java

index 583d3b8af9c31b569dad77d8ab2348156c4d4ecf..ee4fb35be54ebc3644656190e812336c3ac4ac58 100644 (file)
@@ -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