mirror of https://github.com/apache/maven.git
Close properly the readers
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@571106 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0a0bc73d66
commit
fd64c2db2a
|
@ -80,6 +80,7 @@ import org.codehaus.plexus.component.repository.exception.ComponentLookupExcepti
|
|||
import org.codehaus.plexus.component.repository.exception.ComponentRepositoryException;
|
||||
import org.codehaus.plexus.configuration.PlexusConfigurationException;
|
||||
import org.codehaus.plexus.logging.LoggerManager;
|
||||
import org.codehaus.plexus.util.IOUtil;
|
||||
import org.codehaus.plexus.util.StringUtils;
|
||||
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
|
||||
import org.jdom.Document;
|
||||
|
@ -235,7 +236,7 @@ public class MavenEmbedder
|
|||
}
|
||||
finally
|
||||
{
|
||||
reader.close();
|
||||
IOUtil.close( reader );
|
||||
}
|
||||
|
||||
return model;
|
||||
|
@ -323,7 +324,7 @@ public class MavenEmbedder
|
|||
}
|
||||
finally
|
||||
{
|
||||
fileReader.close();
|
||||
IOUtil.close( fileReader );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -752,17 +753,7 @@ public class MavenEmbedder
|
|||
}
|
||||
finally
|
||||
{
|
||||
try
|
||||
{
|
||||
if ( fileReader != null )
|
||||
{
|
||||
fileReader.close();
|
||||
}
|
||||
}
|
||||
catch ( IOException e )
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
IOUtil.close( fileReader );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue