From 43b13fa7ccfc74959ee85f29b56861e3c11555da Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Fri, 4 May 2012 19:18:59 +0000 Subject: [PATCH] [MRM-1628] Silently ignore request to delete artifacts that does not exist on disk anymore Submitted by Fredrik Jonson. git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1334124 13f79535-47bb-0310-9956-ffa450edef68 --- .../content/ManagedDefaultRepositoryContent.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/ManagedDefaultRepositoryContent.java b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/ManagedDefaultRepositoryContent.java index f9b5bb13b..aabda49cf 100644 --- a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/ManagedDefaultRepositoryContent.java +++ b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/ManagedDefaultRepositoryContent.java @@ -66,7 +66,6 @@ public class ManagedDefaultRepositoryContent } public void deleteVersion( VersionedReference reference ) - throws ContentNotFoundException { String path = toMetadataPath( reference ); File projectPath = new File( getRepoRoot(), path ); @@ -76,14 +75,9 @@ public class ManagedDefaultRepositoryContent { FileUtils.deleteQuietly( projectDir ); } - else - { - throw new ContentNotFoundException( "Unable to delete non-existing project directory: " + projectDir ); - } } public void deleteArtifact( ArtifactReference artifactReference ) - throws ContentNotFoundException { String path = toPath( artifactReference ); File filePath = new File( getRepoRoot(), path ); @@ -92,10 +86,6 @@ public class ManagedDefaultRepositoryContent { FileUtils.deleteQuietly( filePath ); } - else - { - throw new ContentNotFoundException( "Unable to delete non-existing project artifact: " + filePath ); - } } public String getId() -- 2.39.5