Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

close file #3

Merged
merged 1 commit into from Jul 16, 2020
Merged

close file #3

merged 1 commit into from Jul 16, 2020

Conversation

elharo
Copy link
Contributor

@elharo elharo commented Jul 16, 2020

No description provided.

@elharo elharo merged commit d37390b into master Jul 16, 2020
@elharo elharo deleted the deps branch July 16, 2020 10:46
{
outputStream = new FileOutputStream( file );
outputStream.write( data.getBytes() );
outputStream.flush();
outputStream.close();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The try-with-resources should handle the close() - this line is now unnecessary.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup no need of flush neither

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants