-
Notifications
You must be signed in to change notification settings - Fork 594
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
Replacing some uses of PrintWriter #5461
Conversation
lbergelson
commented
Nov 29, 2018
- PrintWriter doesn't throw exceptions on write failures and might therefore lead to unexpectedly trunacated data being produced without any notification
- replacing it's use in MetricsUtils and MafOutputRenderer where it might cause problems
- partial fix for Remove uses of PrintWriter #5458
* PrintWriter doesn't throw exceptions on write failures and might therefore lead to unexpectedly trunacated data being produced without any notification * replacing it's use in MetricsUtils and MafOutputRenderer where it might cause problems * partial fix for #5458
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but you missed one of the print writer instances.
@@ -260,7 +261,7 @@ public MafOutputRenderer(final Path outputFilePath, | |||
|
|||
// Open the output object: | |||
try { | |||
printWriter = new PrintWriter(Files.newOutputStream(outputFilePath)); | |||
writer = new PrintWriter(Files.newOutputStream(outputFilePath)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you missed one. :P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
When tests pass feel free to merge.
Codecov Report
@@ Coverage Diff @@
## master #5461 +/- ##
==============================================
- Coverage 86.99% 86.985% -0.005%
+ Complexity 31202 31200 -2
==============================================
Files 1909 1909
Lines 144184 144195 +11
Branches 15951 15951
==============================================
+ Hits 125425 125428 +3
- Misses 12991 12999 +8
Partials 5768 5768
|