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

Replace for with foreach #1560

Merged
merged 1 commit into from
Oct 10, 2018

Conversation

renuka-fernando
Copy link
Contributor

  • Simplify If statements in Double and Float checking methods with of Assert class.

@kcooney
Copy link
Member

kcooney commented Oct 7, 2018

Thanks for the contribution.

The changes to Assert take fewer lines, but I am not sure iI agree that the newer code is simpler. I could see replacing the second "if (something) { return false } return true" with "return inverted something". That being said, presumably the original author and reviewer(s) were happy with what was there...

@renuka-fernando
Copy link
Contributor Author

Yes, I also felt it's easy to understand with if blocks.

@kcooney
Copy link
Member

kcooney commented Oct 9, 2018

@renuka-fernando could you delete the first commit, keep the second commit (the "for-each" commit) and force-push the changes to GitHub?

@renuka-fernando renuka-fernando changed the title Simplify double and float checking methods of Assert class Use foreach Oct 10, 2018
@renuka-fernando renuka-fernando changed the title Use foreach Replace for with foreach Oct 10, 2018
@renuka-fernando
Copy link
Contributor Author

@kcooney
I have deleted the first commit, thank you.

@kcooney kcooney merged commit 4c6975f into junit-team:master Oct 10, 2018
@kcooney
Copy link
Member

kcooney commented Oct 10, 2018

@renuka-fernando thanks! Merged.

aristotle0x01 pushed a commit to aristotle0x01/junit4 that referenced this pull request Jun 27, 2022
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.

2 participants