Skip to content

[MINOR] Fix violations of Sonarqube rule java:S2184#10444

Merged
yihua merged 2 commits intoapache:masterfrom
KUTEJiang:fix/S2184
Mar 1, 2024
Merged

[MINOR] Fix violations of Sonarqube rule java:S2184#10444
yihua merged 2 commits intoapache:masterfrom
KUTEJiang:fix/S2184

Conversation

@KUTEJiang
Copy link
Contributor

@KUTEJiang KUTEJiang commented Jan 4, 2024

Change Logs

This PR fixes 4 violations of Sonarqube Rule java:S2184 : 'Math operands should be cast before assignment'.
For more details, please see
MITRE, CWE-190 - Integer Overflow or Wraparound
CERT, NUM50-J.- Convert integers to floating point for floating-point operations
CERT, INT18-C. - Evaluate integer expressions in a larger size before comparing or assigning to that size

The patch was automatically generated using the ViolationFixer tool.

Impact

Code quality improvements.

Risk level

none

Documentation Update

N/A

Contributor's checklist

  • Read through contributor's guide
  • Change Logs and Impact were stated clearly
  • Adequate tests were added if applicable
  • CI passed

@bvaradar bvaradar changed the title fix violations of Sonarqube rule java:S2184 [MINOR] fix violations of Sonarqube rule java:S2184 Jan 8, 2024
@bvaradar
Copy link
Contributor

bvaradar commented Jan 8, 2024

@KUTEJiang : Can you fix the PR to pass the validation

@github-actions github-actions bot added the size:XS PR with lines of changes in <= 10 label Feb 26, 2024
@yihua yihua changed the title [MINOR] fix violations of Sonarqube rule java:S2184 [MINOR] Fix violations of Sonarqube rule java:S2184 Mar 1, 2024
@yihua
Copy link
Contributor

yihua commented Mar 1, 2024

@KUTEJiang I fixed the PR description. Please do that yourself next time.

@danny0405 danny0405 added the type:refactor Code refactoring and cleanup label Mar 1, 2024
@github-actions github-actions bot added size:S PR with lines of changes in (10, 100] and removed size:XS PR with lines of changes in <= 10 labels Mar 1, 2024
@hudi-bot
Copy link
Collaborator

hudi-bot commented Mar 1, 2024

CI report:

Bot commands @hudi-bot supports the following commands:
  • @hudi-bot run azure re-run the last Azure build

@yihua yihua merged commit 686c4ae into apache:master Mar 1, 2024
yihua added a commit that referenced this pull request May 14, 2024
Co-authored-by: Y Ethan Guo <ethan.guoyihua@gmail.com>
yihua added a commit that referenced this pull request May 14, 2024
Co-authored-by: Y Ethan Guo <ethan.guoyihua@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S PR with lines of changes in (10, 100] type:refactor Code refactoring and cleanup

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

5 participants