You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary D. Gregory (Jira)" <ji...@apache.org> on 2024/10/21 14:34:00 UTC
[jira] [Commented] (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:comment-tabpanel&focusedCommentId=17891556#comment-17891556 ]
Gary D. Gregory commented on COLLECTIONS-842:
---------------------------------------------
Why do we even need this? We can't use it and I can't imagine we're going to duplicate a class hierarchy under it. I think we remove it and label this for 5.0.
> 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-M2
>
>
> 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)