Skip to content

Commit bf4b3f0

Browse files
author
Rishabh Kumar
committed
OAK-11575 : addressed review comments to update comments
1 parent 49b0eba commit bf4b3f0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

oak-commons/src/main/java/org/apache/jackrabbit/oak/commons/collections/IterableUtils.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -450,8 +450,7 @@ public static <T> T find(final Iterable<T> iterable, final Predicate<? super T>
450450
/**
451451
* Returns the last element of the specified iterable, or null if the iterable is empty.
452452
* <p>
453-
* The iterable must be fully traversed to find the last element. If the iterable is empty,
454-
* the null is returned instead.
453+
* The iterable must be fully traversed to find the last element.
455454
*
456455
* @param <T> the type of elements in the iterable
457456
* @param iterable the iterable to get the last element from, must not be null
@@ -461,7 +460,7 @@ public static <T> T getLast(final Iterable<T> iterable) {
461460

462461
Objects.requireNonNull(iterable, "Iterable must not be null.");
463462

464-
// Optimize for Collections, especially Lists
463+
// Optimize for Lists
465464
if (iterable instanceof List) {
466465
final List<T> list = (List<T>) iterable;
467466
return list.isEmpty() ? null : list.get(list.size() - 1);

0 commit comments

Comments
 (0)