This is an automated email from the ASF dual-hosted git repository. garydgregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit 875aa03739b76b127f409d5328b837bd1d7bd6b7 Author: Gary Gregory <[email protected]> AuthorDate: Thu Jul 9 19:40:53 2026 -0400 Inline single-use local variables. --- .../apache/commons/collections4/set/UnmodifiableSortedSet.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/apache/commons/collections4/set/UnmodifiableSortedSet.java b/src/main/java/org/apache/commons/collections4/set/UnmodifiableSortedSet.java index 237de8619..37a313e16 100644 --- a/src/main/java/org/apache/commons/collections4/set/UnmodifiableSortedSet.java +++ b/src/main/java/org/apache/commons/collections4/set/UnmodifiableSortedSet.java @@ -106,8 +106,7 @@ public final class UnmodifiableSortedSet<E> @Override public SortedSet<E> headSet(final E toElement) { - final SortedSet<E> head = decorated().headSet(toElement); - return unmodifiableSortedSet(head); + return unmodifiableSortedSet(decorated().headSet(toElement)); } @Override @@ -174,14 +173,12 @@ public final class UnmodifiableSortedSet<E> @Override public SortedSet<E> subSet(final E fromElement, final E toElement) { - final SortedSet<E> sub = decorated().subSet(fromElement, toElement); - return unmodifiableSortedSet(sub); + return unmodifiableSortedSet(decorated().subSet(fromElement, toElement)); } @Override public SortedSet<E> tailSet(final E fromElement) { - final SortedSet<E> tail = decorated().tailSet(fromElement); - return unmodifiableSortedSet(tail); + return unmodifiableSortedSet(decorated().tailSet(fromElement)); } /**
