-
Notifications
You must be signed in to change notification settings - Fork 135
Open
Description
The definition of SIPHeaderList#removeLast causes a compilation error with Java 21:
| public void removeLast() { |
The change is due to the introduction of 'Sequenced Collections' in JDK 21 release notes, which added a removeLast method to the collections API that clashes with the definition in SIPHeaderList.
The error could be fixed by changing the definition of SIPHeaderList#removeLast to match the definition in the collections API, or by renaming the method.
Repro:
JAVA_HOME=<path to JDK 21> ant -Djavac.source=8 -Djavac.target=8 -Dsource.encoding=iso-8859-1 runtck
[jain-javac] /usr/local/google/home/cushon/src/jsip/src/gov/nist/javax/sip/header/ims/ServiceRouteList.java:37: error: removeLast() in SIPHeaderList cannot implement removeLast() in List
[jain-javac] public class ServiceRouteList extends SIPHeaderList<ServiceRoute> {
[jain-javac] ^
[jain-javac] return type void is not compatible with ServiceRoute
[jain-javac] where E is a type-variable:
[jain-javac] E extends Object declared in interface List
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels