ballerina-lang
ballerina-lang copied to clipboard
[Refactoring] Make util classes final and add private constructors
Purpose
- Add private constructor to utility classes
- Mark util classes final https://sonarcloud.io/organizations/ballerina-platform/rules?open=java%3AS1118&rule_key=java%3AS1118 https://sonarcloud.io/organizations/ballerina-platform/rules?open=java%3AS2440&rule_key=java%3AS2440
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
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 77.49%. Comparing base (
2f331d4) to head (b171ee3). Report is 443 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #42944 +/- ##
============================================
+ Coverage 77.30% 77.49% +0.19%
- Complexity 58532 58583 +51
============================================
Files 3460 3439 -21
Lines 220074 219666 -408
Branches 28911 28911
============================================
+ Hits 170125 170233 +108
+ Misses 40544 40017 -527
- Partials 9405 9416 +11
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
For readability, it is recommended to have a blank line after the class name header. https://raw.githubusercontent.com/wso2/product-is/master/docs/wso2_codestyle.xml We can modify the classes in the PR accordingly to give all of them a similar format.
@HindujaB I fixed the newline after class header for all classes that were previously in this PR. Should I also fix it for any other class (all non util classes) or is this fine for now? There are ~450 other classes where this could be applied.
@HindujaB I fixed the newline after the class header for all classes that were previously in this PR. Should I also fix it for any other class (all non-util classes) or is this fine for now? There are ~450 other classes where this could be applied.
It is better to get them changed as well. Since the PR is getting larger, I recommend creating a new PR for this and address there.
For readability, it is recommended to have a blank line after the class name header. https://raw.githubusercontent.com/wso2/product-is/master/docs/wso2_codestyle.xml We can modify the classes in the PR accordingly to give all of them a similar format.
@HindujaB In the codestyle that you're referring to, there is also a rule that every method should start with a blank line, which I don't see anywhere in the project.
<option name="BLANK_LINES_BEFORE_METHOD_BODY" value="1" />
I would argue that this is unnecessary whitespace and should not be applied. What do you think?
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.