olamy commented on a change in pull request #3:
URL:
https://github.com/apache/maven-resources-plugin/pull/3#discussion_r456059236
##########
File path:
src/test/java/org/apache/maven/plugins/resources/stub/MavenProjectBuildStub.java
##########
@@ -291,24 +291,18 @@ private void createFiles( String parent, String
testparent )
}
}
- private void populateFile( File file )
+ private void populateFile( File file ) throws IOException
{
- FileOutputStream outputStream;
String data = dataMap.get( file.getName() );
if ( ( data != null ) && file.exists() )
{
- try
+ try ( FileOutputStream outputStream = new FileOutputStream( file )
)
{
- outputStream = new FileOutputStream( file );
outputStream.write( data.getBytes() );
outputStream.flush();
outputStream.close();
Review comment:
yup no need of flush neither
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]