This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
The following commit(s) were added to refs/heads/master by this push:
new 3affddf33 [COLLECTIONS-888] PatriciaTrie incompatible with Java 21
(JEP 431 (#673)
3affddf33 is described below
commit 3affddf334682434304c1ee2cd75bc2d6274f405
Author: Gary Gregory <[email protected]>
AuthorDate: Wed Apr 1 11:11:03 2026 -0400
[COLLECTIONS-888] PatriciaTrie incompatible with Java 21 (JEP 431 (#673)
Sequenced Collections)
---
.../collections4/trie/AbstractPatriciaTrie.java | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git
a/src/main/java/org/apache/commons/collections4/trie/AbstractPatriciaTrie.java
b/src/main/java/org/apache/commons/collections4/trie/AbstractPatriciaTrie.java
index 472bbe17d..4de933dc9 100644
---
a/src/main/java/org/apache/commons/collections4/trie/AbstractPatriciaTrie.java
+++
b/src/main/java/org/apache/commons/collections4/trie/AbstractPatriciaTrie.java
@@ -1432,10 +1432,13 @@ public abstract class AbstractPatriciaTrie<K, V>
extends AbstractBitwiseTrie<K,
/**
* Returns the first entry the {@link
org.apache.commons.collections4.Trie} is storing.
* <p>
- * This is implemented by going always to the left until
- * we encounter a valid uplink. That uplink is the first key.
+ * This is implemented by going always to the left until we encounter a
valid uplink. That uplink is the first key.
+ * </p>
+ *
+ * @return the first entry the {@link
org.apache.commons.collections4.Trie} is storing.
+ * @since 4.6.0
*/
- TrieEntry<K, V> firstEntry() {
+ public TrieEntry<K, V> firstEntry() {
// if Trie is empty, no first node.
if (isEmpty()) {
return null;
@@ -1715,10 +1718,14 @@ public abstract class AbstractPatriciaTrie<K, V>
extends AbstractBitwiseTrie<K,
/**
* Returns the last entry the {@link org.apache.commons.collections4.Trie}
is storing.
*
- * <p>This is implemented by going always to the right until
- * we encounter a valid uplink. That uplink is the last key.
+ * <p>
+ * This is implemented by going always to the right until we encounter a
valid uplink. That uplink is the last key.
+ * </p>
+ *
+ * @return the last entry the {@link org.apache.commons.collections4.Trie}
is storing.
+ * @since 4.6.0
*/
- TrieEntry<K, V> lastEntry() {
+ public TrieEntry<K, V> lastEntry() {
return followRight(root.left);
}