summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2015-10-07 12:19:27 +1100
committerOlivier Lamy <olamy@apache.org>2015-10-07 12:19:27 +1100
commitb2ced491a9b1d7d3b446142ce743d28c1ae4d50e (patch)
treed243786e712b402a3d52d52f7a94a1709f5dc5ce
parenta39985692c55c85394deb4a075d9de2c066ff2f5 (diff)
downloadarchiva-b2ced491a9b1d7d3b446142ce743d28c1ae4d50e.tar.gz
archiva-b2ced491a9b1d7d3b446142ce743d28c1ae4d50e.zip
ooops fix compilation
-rw-r--r--archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java21
1 files changed, 6 insertions, 15 deletions
diff --git a/archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java b/archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java
index da3c44470..2cea31c36 100644
--- a/archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java
+++ b/archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java
@@ -420,10 +420,7 @@ public class FileMetadataRepository
try
{
File dir = getMetadataDirectory( repositoryId, facetId );
- if ( !Files.deleteIfExists( dir.toPath() ) )
- {
- log.error( "Cannot delete the metadata repository {}", dir );
- }
+ FileUtils.deleteDirectory( dir );
}
catch ( IOException e )
{
@@ -438,10 +435,7 @@ public class FileMetadataRepository
try
{
File dir = new File( getMetadataDirectory( repoId, facetId ), name );
- if ( !Files.deleteIfExists( dir.toPath() ) )
- {
- log.error( "Cannot delete the metadata repository {}", dir );
- }
+ FileUtils.deleteDirectory( dir );
}
catch ( IOException e )
{
@@ -778,7 +772,7 @@ public class FileMetadataRepository
}
}
- Files.deleteIfExists( directory.toPath() );
+ FileUtils.deleteDirectory( directory );
//writeProperties( properties, directory, PROJECT_VERSION_METADATA_KEY );
}
catch ( IOException e )
@@ -812,10 +806,7 @@ public class FileMetadataRepository
try
{
File dir = getDirectory( repoId );
- if ( !Files.deleteIfExists( dir.toPath() ) )
- {
- log.error( "Cannot delete repository {}", dir );
- }
+ FileUtils.deleteDirectory( dir );
}
catch ( IOException e )
{
@@ -1365,7 +1356,7 @@ public class FileMetadataRepository
try
{
File directory = new File( getDirectory( repositoryId ), namespace + "/" + projectId );
- Files.deleteIfExists( directory.toPath() );
+ FileUtils.deleteDirectory( directory );
}
catch ( IOException e )
{
@@ -1380,7 +1371,7 @@ public class FileMetadataRepository
try
{
File directory = new File( getDirectory( repoId ), namespace + "/" + projectId + "/" + projectVersion );
- Files.deleteIfExists( directory.toPath() );
+ FileUtils.deleteDirectory( directory );
}
catch ( IOException e )
{