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

[ISSUE #7785] Remove the redundant code #7784

Merged
merged 1 commit into from
Jan 28, 2024
Merged

Conversation

wyyl1
Copy link
Contributor

@wyyl1 wyyl1 commented Jan 25, 2024

Which Issue(s) This PR Fixes

Remove the redundant code

Fixes #7785

Brief Description

Remove the redundant code because Math.abs does not return negative numbers

How Did You Test This Change?

@Test
public void testResultOfResetIsGreaterThanOrEqualToZero() {
    ThreadLocalIndex localIndex = new ThreadLocalIndex();
    localIndex.reset();
    assertThat(localIndex.incrementAndGet() > 0).isTrue();
}

Copy link
Member

@mxsm mxsm left a comment

Choose a reason for hiding this comment

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

LGTM

@RongtongJin RongtongJin changed the title Remove the redundant code [ISSUE #7785] Remove the redundant code Jan 27, 2024
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (04eec34) 43.22% compared to head (4da51e5) 43.26%.
Report is 1 commits behind head on develop.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #7784      +/-   ##
=============================================
+ Coverage      43.22%   43.26%   +0.04%     
- Complexity      9870     9881      +11     
=============================================
  Files           1173     1173              
  Lines          85034    85032       -2     
  Branches       11013    11012       -1     
=============================================
+ Hits           36752    36791      +39     
+ Misses         43717    43678      -39     
+ Partials        4565     4563       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@RongtongJin RongtongJin merged commit e104273 into apache:develop Jan 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement] Remove the redundant code
4 participants