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

Remove unnecessary conditions in IndexComparator #4959

Merged
merged 1 commit into from Oct 11, 2023

Conversation

asashour
Copy link
Contributor

This PR removes two unnecessary conditions, which always evaluate to true, as detected by IntelliJ.

The reason is: in line 71, if any of them is 0, then the method return.

And since they are the result of list.size(), they can not be negative.

And because of the previous two points, both must be more than 0, and so the conditions are not needed.

Signed-off-by: Ahmed Ashour <asashour@yahoo.com>
Copy link
Contributor

@MalloD12 MalloD12 left a comment

Choose a reason for hiding this comment

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

Approved.

Review and testing results:

Code change makes sense to me. Build and all tests check have been successfully executed.
Screenshot 2023-10-02 at 7 10 47 PM

Things to be aware of:

  • None

Things to worry about:

  • None

@filipelautert filipelautert merged commit d093b2a into liquibase:master Oct 11, 2023
9 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants