[
https://issues.apache.org/jira/browse/COLLECTIONS-842?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alex Herbert updated COLLECTIONS-842:
-------------------------------------
Description:
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}
was:...it returns "boolean" in commons-collections4, but is void in JDK 21
(see
https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/List.html#addLast(E))
> 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
>
> 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)