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

Make IsEmptyCallOnCollections also support < and > operators #2612

Merged
merged 1 commit into from
Jan 9, 2023

Conversation

knutwannheden
Copy link
Contributor

The expressions c.size() > 0 and 0 < c.size() can both also be replaced with !c.isEmpty().

The expressions `c.size() > 0` and `0 < c.size()` can both also be replaced with `!c.isEmpty()`.
@knutwannheden
Copy link
Contributor Author

Having c.size() > 0 instead of c.size() != 0 is not all that uncommon.

@tkvangorder tkvangorder merged commit f4b348d into openrewrite:main Jan 9, 2023
@sambsnyd sambsnyd added this to the 7.35.0 milestone Jan 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants