]> source.dussan.org Git - archiva.git/commitdiff
MRM-1004 - RepositoryServlet tests fail intermittently on Windows. Submitted by Marti...
authorJames William Dumay <jdumay@apache.org>
Mon, 17 Nov 2008 01:39:20 +0000 (01:39 +0000)
committerJames William Dumay <jdumay@apache.org>
Mon, 17 Nov 2008 01:39:20 +0000 (01:39 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@718157 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavResourceFactory.java

index 1abf8242dec09d054651bb57aab0b22475a587ce..74f43e0ddb0373391ab2b15cc88553d2b6dd0032 100644 (file)
@@ -587,7 +587,11 @@ public class ArchivaDavResourceFactory
 
         try
         {
-            Model model = new MavenXpp3Reader().read( new FileReader( pom ) );
+            // MavenXpp3Reader leaves the file open, so we need to close it ourselves.
+            FileReader reader = new FileReader( pom );
+            Model model = new MavenXpp3Reader().read( reader );
+            reader.close();
+
             DistributionManagement dist = model.getDistributionManagement();
             if ( dist != null )
             {