From: James William Dumay Date: Mon, 17 Nov 2008 01:39:20 +0000 (+0000) Subject: MRM-1004 - RepositoryServlet tests fail intermittently on Windows. Submitted by Marti... X-Git-Tag: archiva-1.2~198 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7feb3eb52539d4c7ca5a819d59fe8104079a9bf4;p=archiva.git MRM-1004 - RepositoryServlet tests fail intermittently on Windows. Submitted by Martin Cooper. git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@718157 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavResourceFactory.java b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavResourceFactory.java index 1abf8242d..74f43e0dd 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavResourceFactory.java +++ b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavResourceFactory.java @@ -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 ) {