closed streams
git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@1405265 13f79535-47bb-0310-9956-ffa450edef68master
parent
62dca6fbd5
commit
2077b3e8cf
|
|
@ -189,13 +189,20 @@ public class PluginHelpGenerator
|
||||||
properties.put( "artifactId", pluginDescriptor.getArtifactId() );
|
properties.put( "artifactId", pluginDescriptor.getArtifactId() );
|
||||||
properties.put( "goalPrefix", pluginDescriptor.getGoalPrefix() );
|
properties.put( "goalPrefix", pluginDescriptor.getGoalPrefix() );
|
||||||
|
|
||||||
// FIXME encoding !
|
|
||||||
|
|
||||||
StringWriter stringWriter = new StringWriter();
|
StringWriter stringWriter = new StringWriter();
|
||||||
|
|
||||||
InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream( "help-class-source.vm" );
|
InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream( "help-class-source.vm" );
|
||||||
InputStreamReader isReader = new InputStreamReader( is ); // FIXME platform encoding
|
InputStreamReader isReader = null;
|
||||||
velocityComponent.getEngine().evaluate( context, stringWriter, "", isReader ); // FIXME close reader
|
try
|
||||||
|
{
|
||||||
|
isReader = new InputStreamReader( is ); // FIXME platform encoding
|
||||||
|
velocityComponent.getEngine().evaluate( context, stringWriter, "", isReader );
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
IOUtil.close( is );
|
||||||
|
IOUtil.close( isReader );
|
||||||
|
}
|
||||||
|
|
||||||
return stringWriter.toString();
|
return stringWriter.toString();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue