You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Alex Herbert (Jira)" <ji...@apache.org> on 2024/05/07 13:57:00 UTC
[jira] [Resolved] (COLLECTIONS-842) AbstractLinkedList incompatible with JDK 21's java.util.List
[ https://issues.apache.org/jira/browse/COLLECTIONS-842?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alex Herbert resolved COLLECTIONS-842.
--------------------------------------
Fix Version/s: 4.5.0
Resolution: Implemented
Deprecated existing AbstractLinkedList (and sub-classes) and added a replacement list compatible with Java 21 in commit:
634b23dbbbaf64816685b168aedfcfec2dbe00c1
> AbstractLinkedList 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
> Fix For: 4.5.0
>
>
> New JDK 21 method in java.util.List [addLast|https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/List.html#addLast(E)] has a {{void}} return type. This clashes with the existing {{boolean}} return from the same method in AbstractLinkedList:
> {code:java}
> java.util.List {
> default void addLast(E e);
> }
> org.apache.commons.collections4.list.AbstractLinkedList {
> public boolean addLast(final E o);
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)