You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
cushon
added a commit
to cushon/jsip
that referenced
this issue
Nov 6, 2024
This updates the return type of getFirst and getLast, and returns the
removed value from removeFirst and removeLast, for compatibility with
the versions of those methods added to SequencedCollection in JDK 21.
Fixesusnistgov#86
The definition of
SIPHeaderList#removeLast
causes a compilation error with Java 21:jsip/src/gov/nist/javax/sip/header/SIPHeaderList.java
Line 289 in bbf3067
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 inSIPHeaderList
.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:
The text was updated successfully, but these errors were encountered: