[
https://issues.apache.org/jira/browse/COLLECTIONS-842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17838917#comment-17838917
]
Alex Herbert commented on COLLECTIONS-842:
------------------------------------------
I think these are must haves:
* Mark AbstractLinkedList, CursorableLinkedList or NodeCachingLinkedList as
deprecated.
* Create AbstractLinkedList2 supporting the new JDK 21 API.
The performance test for NodeCachingLinkedList indicates it is redundant. I do
not think we need to support this going forward.
The question is what to do about CursorableLinkedList. It supports modifying
the list and a ListIterator concurrently. This is not a feature in the JDK
LinkedList class. That will fail-fast if the list is modified when using any
iterator.
Since we cannot know if this is actively being used in the community a solution
would be to not add CursorableLinkedList2, then add it to a later release if it
is requested by a downstream user.
I dislike the name AbstractLinkedList2. In Collections 5 the original
AbstractLinkedList will not be present. So a class with a 2 suffix going
forward makes no sense. Suggestions are welcome, e.g. BaseLinkedList,
ExtendableLinkedList.
> AbstractLinkedList apparently incompatible with JDK 21's java.util.List
> -----------------------------------------------------------------------
>
> Key: COLLECTIONS-842
> URL: https://issues.apache.org/jira/browse/COLLECTIONS-842
> Project: Commons Collections
> Issue Type: Bug
> Components: List
> Reporter: Julian Reschke
> Priority: Major
>
> ...it returns "boolean" in commons-collections4, but is void in JDK 21 (see
> https://download.java.net/java/early_access/jdk21/docs/api/java.base/java/util/List.html#addLast(E))
--
This message was sent by Atlassian Jira
(v8.20.10#820010)