Skip to content

OAK-11427 : removed usage of Guava Iterables.isEmpty#2023

Merged
rishabhdaim merged 3 commits intotrunkfrom
OAK-11427
Jan 24, 2025
Merged

OAK-11427 : removed usage of Guava Iterables.isEmpty#2023
rishabhdaim merged 3 commits intotrunkfrom
OAK-11427

Conversation

@rishabhdaim
Copy link
Contributor

No description provided.

@github-actions
Copy link

Commit-Check ✔️

@reschke
Copy link
Contributor

reschke commented Jan 23, 2025

if (iterable instanceof Collection) {
return ((Collection<?>) iterable).isEmpty();
}
return StreamUtils.toStream(iterable).findAny().isEmpty();
Copy link
Contributor

Choose a reason for hiding this comment

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

Is that better than simply saying:

iterable.getIterator().hasNext()

?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

addressed in e5cc56f

@rishabhdaim rishabhdaim requested a review from reschke January 23, 2025 16:59
@sonarqubecloud
Copy link

@rishabhdaim rishabhdaim merged commit 7572f8b into trunk Jan 24, 2025
5 of 6 checks passed
@rishabhdaim rishabhdaim deleted the OAK-11427 branch January 24, 2025 09:28
andreeastroe96 pushed a commit to andreeastroe96/jackrabbit-oak that referenced this pull request Feb 25, 2025
* OAK-11427 : removed usage of Guava Iterables.isEmpty

* OAK-11427 : fixed import issue

* OAK-11427 : used commons-collections4 IterableUtils.isEmpty

---------

Co-authored-by: Rishabh Kumar <diam@adobe.com>
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