t-rana commented on code in PR #1968:
URL: https://github.com/apache/jackrabbit-oak/pull/1968#discussion_r1909871691
##########
oak-commons/src/main/java/org/apache/jackrabbit/oak/commons/collections/CollectionUtils.java:
##########
@@ -520,6 +521,34 @@ public static <T> Stream<T> toStream(@NotNull Iterator<T>
iterator) {
return StreamSupport.stream(toIterable(iterator).spliterator(), false);
}
+ public static boolean elementsEqual(Iterable<?> iterable1, Iterable<?>
iterable2) {
+ Objects.requireNonNull(iterable1);
+ Objects.requireNonNull(iterable2);
+
+ if (iterable1 instanceof Collection && iterable2 instanceof
Collection) {
+ Collection<?> collection1 = (Collection<?>) iterable1;
+ Collection<?> collection2 = (Collection<?>) iterable2;
+ if (collection1.size() != collection2.size()) {
+ return false;
+ }
+ }
+
Review Comment:
Changes done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]