o applying patch to allow to read the model with a reader

Submitted by: Eugene Kuleshov


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@581732 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2007-10-03 21:40:17 +00:00
parent b3461d5936
commit 5d2c433ba9
1 changed files with 16 additions and 14 deletions

View File

@ -206,22 +206,24 @@ public class MavenEmbedder
}
public Model readModel( File file )
throws XmlPullParserException, IOException
throws XmlPullParserException, IOException
{
Reader reader = new FileReader( file );
Reader reader = new FileReader( file );
try
{
return readModel( reader );
}
finally
{
IOUtil.close( reader );
}
}
Model model;
try
{
model = modelReader.read( reader );
}
finally
{
IOUtil.close( reader );
}
return model;
public Model readModel( Reader reader )
throws XmlPullParserException, IOException
{
return modelReader.read( reader );
}
public void writeModel( Writer writer,