Skip to content
Commit 411ad89a authored by Vladimir Druzenko's avatar Vladimir Druzenko
Browse files

java/apache-commons-collections: limit JAVA_VERSION from 8 to 20 because build fails with 21+

Build error with OpenJDK 21:
    [javac] /wrkdirs/usr/ports/java/apache-commons-collections/work/commons-collections-3.2.2-src/src/java/org/apache/commons/collections/CursorableLinkedList.java:188: error: addLast(Object) in CursorableLinkedList cannot implement addLast(E) in List
    [javac]     public boolean addLast(Object o) {
    [javac]                    ^
    [javac]   return type boolean is not compatible with void
    [javac]   where E is a type-variable:
    [javac]     E extends Object declared in interface List
    [javac] /wrkdirs/usr/ports/java/apache-commons-collections/work/commons-collections-3.2.2-src/src/java/org/apache/commons/collections/CursorableLinkedList.java:176: error: addFirst(Object) in CursorableLinkedList cannot implement addFirst(E) in List
    [javac]     public boolean addFirst(Object o) {
    [javac]                    ^
    [javac]   return type boolean is not compatible with void
    [javac]   where E is a type-variable:
    [javac]     E extends Object declared in interface List

New JDK 21 methods in java.util.List addFirst and addLast has a void
return type. This clashes with the existing boolean return from the
same method in AbstractLinkedList.
Upstream fixed this in 4.5.0 only. But this old 3.x branch isn't fixed.
Upstream issue: https://issues.apache.org/jira/browse/COLLECTIONS-842

PR:		279425
Reported by:	antoine (exp-run)
parent 1acc62c5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment