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

refactor: implement agreed upon changes based on discussion (#266) #336

Conversation

ata-nas
Copy link
Contributor

@ata-nas ata-nas commented Nov 11, 2024

Description:

Implement agreed upon changes from discussion #266

Related issue(s):

Fixes #305

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

  • create new class MathUtilities
  • implement proposed change to create isPowerOfTwo(int) boolean check inside MathUtilities
  • create new class Preconditions
  • implement proposed change to create requirePowerOfTwo(int) strict precondition inside Preconditions
  • implement proposed change to create isBlank(String) boolean check inside StringUtilities
  • implement proposed change to move StringUtilities#requireNotBlank(String) to Preconditions
  • integrate the new changes for the MathUtilities into the respective places

@ata-nas ata-nas added the Improvement Code changes driven by non business requirements label Nov 11, 2024
@ata-nas ata-nas added this to the 0.3.0 milestone Nov 11, 2024
@ata-nas ata-nas self-assigned this Nov 11, 2024
@ata-nas ata-nas linked an issue Nov 11, 2024 that may be closed by this pull request
@ata-nas ata-nas marked this pull request as ready for review November 11, 2024 14:48
@ata-nas ata-nas requested a review from a team as a code owner November 11, 2024 14:48
georgi-l95
georgi-l95 previously approved these changes Nov 11, 2024
Copy link
Contributor

@georgi-l95 georgi-l95 left a comment

Choose a reason for hiding this comment

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

LG

@ata-nas ata-nas requested a review from a team November 12, 2024 13:57
Copy link
Contributor

@mattp-swirldslabs mattp-swirldslabs left a comment

Choose a reason for hiding this comment

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

Looks pretty good. Please remove all the exclamation points from the exception message strings.

Signed-off-by: Atanas Atanasov <[email protected]>
@ata-nas ata-nas merged commit fb81199 into main Nov 12, 2024
15 checks passed
@ata-nas ata-nas deleted the 305-refactor-implement-agreed-upon-changes-based-on-discussion-266 branch November 12, 2024 16:41
Copy link

codecov bot commented Nov 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.05%. Comparing base (401b645) to head (93c2c06).
Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #336      +/-   ##
============================================
+ Coverage     93.98%   94.05%   +0.07%     
- Complexity      288      300      +12     
============================================
  Files            66       68       +2     
  Lines          1163     1177      +14     
  Branches         83       82       -1     
============================================
+ Hits           1093     1107      +14     
  Misses           57       57              
  Partials         13       13              
Files with missing lines Coverage Δ
...a/com/hedera/block/common/utils/FileUtilities.java 100.00% <100.00%> (ø)
...a/com/hedera/block/common/utils/MathUtilities.java 100.00% <100.00%> (ø)
...a/com/hedera/block/common/utils/Preconditions.java 100.00% <100.00%> (ø)
...com/hedera/block/common/utils/StringUtilities.java 100.00% <100.00%> (ø)
...m/hedera/block/server/mediator/MediatorConfig.java 100.00% <100.00%> (ø)
...m/hedera/block/server/notifier/NotifierConfig.java 100.00% <100.00%> (ø)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement Code changes driven by non business requirements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

refactor: implement agreed upon changes based on discussion (#266)
3 participants