Conversation
…eptions are handled (see SonarQube rule: S2142). Signed-off-by: Greg Schohn <greg.schohn@gmail.com>
Signed-off-by: Greg Schohn <greg.schohn@gmail.com>
Codecov Report
@@ Coverage Diff @@
## main #380 +/- ##
============================================
- Coverage 64.23% 63.91% -0.33%
+ Complexity 726 721 -5
============================================
Files 82 82
Lines 3277 3289 +12
Branches 306 306
============================================
- Hits 2105 2102 -3
- Misses 983 997 +14
- Partials 189 190 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
| new FileOutputStream(params.outputFilename, true); | ||
| var bufferedOutputStream = new BufferedOutputStream(outputStream); | ||
| var blockingTrafficStream = TrafficCaptureSourceFactory.createTrafficCaptureSource(params, | ||
| Duration.ofSeconds(params.lookaheadTimeSeconds)); |
There was a problem hiding this comment.
Can we add another line here or something to distinguish that the try parenthesis has now ended
There was a problem hiding this comment.
You & I think alike ;).
I got fed up with too many resources and not knowing where the distinction was & did that in the last delinting PR.
| try { | ||
| pullCaptureFromSourceToAccumulator(trafficChunkStream, trafficToHttpTransactionAccumulator); | ||
| } catch (InterruptedException ex) { | ||
| throw ex; |
There was a problem hiding this comment.
Do we need to add a Thread.currentThread().interrupt(); here?
There was a problem hiding this comment.
No. The general rule is if you're suppressing that this was an interruption, you should reset the interrupt state. Since we're propagating (so that we don't obscure it), the final catch-receiver can handle re-interrupting.
Description
More improvements to fix issues caught in running a lint checker.
Testing
./gradlew allTests
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.