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
This commit is contained in:
James William Dumay 2008-11-17 01:39:20 +00:00
parent 125d7ad42e
commit 7feb3eb525
1 changed files with 5 additions and 1 deletions

View 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 )
{