ballerina-lang
ballerina-lang copied to clipboard
[Refactoring] Exceptions in "throws" clauses should not be superfluous
Purpose
Superfluous exceptions within throws clauses have negative effects on the readability and maintainability of the code. An exception in a throws clause is superfluous if it is:
- listed multiple times
- a subclass of another listed exception
- not actually thrown by any execution path of the method
https://sonarcloud.io/organizations/ballerina-platform/rules?open=java%3AS1130&rule_key=java%3AS1130
Approach
Describe how you are implementing the solutions along with the design details.
Samples
Provide high-level details about the samples related to this feature.
Remarks
List any other known issues, related PRs, TODO items, or any other notes related to the PR.
Check List
- [x] Read the Contributing Guide
- [ ] Updated Change Log
- [ ] Checked Tooling Support (#<Issue Number>)
- [ ] Added necessary tests
- [ ] Unit Tests
- [ ] Spec Conformance Tests
- [ ] Integration Tests
- [ ] Ballerina By Example Tests
- [ ] Increased Test Coverage
- [ ] Added necessary documentation
- [ ] API documentation
- [ ] Module documentation in Module.md files
- [ ] Ballerina By Examples
Codecov Report
Attention: Patch coverage is 44.44444% with 15 lines in your changes missing coverage. Please review.
Project coverage is 77.32%. Comparing base (
9ba8c66) to head (2afb0f1). Report is 247 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #42946 +/- ##
============================================
+ Coverage 77.29% 77.32% +0.02%
+ Complexity 51358 51356 -2
============================================
Files 2932 2932
Lines 204536 204467 -69
Branches 26698 26713 +15
============================================
- Hits 158105 158094 -11
+ Misses 37835 37776 -59
- Partials 8596 8597 +1
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the stale label is removed or commented.
Closed PR due to inactivity for more than 18 days.
@MaryamZi @gimantha FYI
We will consider the PR (https://github.com/ballerina-platform/ballerina-lang/pull/43256) as the active open PR and will keep this one closed