Merge ~vpa1977/ubuntu/+source/android-platform-external-nist-sip:ubuntu/devel into ubuntu/+source/android-platform-external-nist-sip:ubuntu/devel

Proposed by Vladimir Petko
Status: Merged
Merged at revision: 945e730906e11d50ab0e8857829d4aadf464b743
Proposed branch: ~vpa1977/ubuntu/+source/android-platform-external-nist-sip:ubuntu/devel
Merge into: ubuntu/+source/android-platform-external-nist-sip:ubuntu/devel
Diff against target: 97 lines (+65/-1)
4 files modified
debian/changelog (+7/-0)
debian/control (+2/-1)
debian/patches/java21-update-list-api.patch (+55/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Zixing Liu (community) Approve
git-ubuntu import Pending
Review via email: mp+461860@code.launchpad.net

Description of the change

This MP resolves ftbfs due to Java 21 API changes

PPA: ppa:vpa1977/plusone [1]

Changes:
 - Change method signatures to conform to Java 21 API specification for java.util.List.

Testing:
 - package builds[2]
 - piuparts test [3]

[1] https://launchpad.net/~vpa1977/+archive/ubuntu/plusone
[2] https://launchpad.net/~vpa1977/+archive/ubuntu/plusone/+sourcepub/15839824/+listing-archive-extra
[3] https://bugs.launchpad.net/ubuntu/+source/android-platform-external-nist-sip/+bug/2056086/comments/1

To post a comment you must log in.
Revision history for this message
Zixing Liu (liushuyu-011) wrote :

Looks good to me.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/debian/changelog b/debian/changelog
index 80c7c8a..505499b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
1android-platform-external-nist-sip (9.0.0+r35-1.1ubuntu1) noble; urgency=medium
2
3 * d/p/java21-update-list-api.patch: add patch to workaround Java 21
4 java.util.List API changes (LP: #2056086).
5
6 -- Vladimir Petko <vladimir.petko@canonical.com> Wed, 06 Mar 2024 14:00:01 +1300
7
1android-platform-external-nist-sip (9.0.0+r35-1.1) unstable; urgency=medium8android-platform-external-nist-sip (9.0.0+r35-1.1) unstable; urgency=medium
29
3 * Non-maintainer upload.10 * Non-maintainer upload.
diff --git a/debian/control b/debian/control
index 11dc1d5..141f8bc 100644
--- a/debian/control
+++ b/debian/control
@@ -1,7 +1,8 @@
1Source: android-platform-external-nist-sip1Source: android-platform-external-nist-sip
2Section: java2Section: java
3Priority: optional3Priority: optional
4Maintainer: Android Tools Maintainers <android-tools-devel@lists.alioth.debian.org>4Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
5XSBC-Original-Maintainer: Android Tools Maintainers <android-tools-devel@lists.alioth.debian.org>
5Uploaders: Katerina <ykaterina0319@gmail.com>6Uploaders: Katerina <ykaterina0319@gmail.com>
6Build-Depends: debhelper (>=12),7Build-Depends: debhelper (>=12),
7 default-jdk-headless,8 default-jdk-headless,
diff --git a/debian/patches/java21-update-list-api.patch b/debian/patches/java21-update-list-api.patch
8new file mode 1006449new file mode 100644
index 0000000..9e7be2d
--- /dev/null
+++ b/debian/patches/java21-update-list-api.patch
@@ -0,0 +1,55 @@
1Description: workaround java.util.List changes in Java 21
2 Java 21 adds removeFirst()/removeLast() and getFirst()/getLast() methods
3 that are also defined in the class SIPHeader. Update method signatures
4 to match Java 21 API.
5Author: Vladimir Petko <vladimir.petko@canonical.com>
6Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/android-platform-external-nist-sip/+bug/2056086
7Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1065522
8Frwarded: not-needed
9Last-Update: 2024-03-06
10
11--- a/java/gov/nist/javax/sip/header/SIPHeaderList.java
12+++ b/java/gov/nist/javax/sip/header/SIPHeaderList.java
13@@ -208,7 +208,7 @@
14 *
15 * @return SIPHeader first element of the list.
16 */
17- public Header getFirst() {
18+ public HDR getFirst() {
19 if (hlist == null || hlist.isEmpty())
20 return null;
21 else
22@@ -220,7 +220,7 @@
23 *
24 * @return SIPHeader last element of the list.
25 */
26- public Header getLast() {
27+ public HDR getLast() {
28 if (hlist == null || hlist.isEmpty())
29 return null;
30 return hlist.get(hlist.size() - 1);
31@@ -277,18 +277,19 @@
32 /**
33 * Remove the first element of this list.
34 */
35- public void removeFirst() {
36+ public HDR removeFirst() {
37 if (hlist.size() != 0)
38- hlist.remove(0);
39-
40+ return hlist.remove(0);
41+ return null;
42 }
43
44 /**
45 * Remove the last element of this list.
46 */
47- public void removeLast() {
48+ public HDR removeLast() {
49 if (hlist.size() != 0)
50- hlist.remove(hlist.size() - 1);
51+ return hlist.remove(hlist.size() - 1);
52+ return null;
53 }
54
55 /**
diff --git a/debian/patches/series b/debian/patches/series
0new file mode 10064456new file mode 100644
index 0000000..9589098
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
1java21-update-list-api.patch

Subscribers

People subscribed via source and target branches