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
1diff --git a/debian/changelog b/debian/changelog
2index 80c7c8a..505499b 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,10 @@
6+android-platform-external-nist-sip (9.0.0+r35-1.1ubuntu1) noble; urgency=medium
7+
8+ * d/p/java21-update-list-api.patch: add patch to workaround Java 21
9+ java.util.List API changes (LP: #2056086).
10+
11+ -- Vladimir Petko <vladimir.petko@canonical.com> Wed, 06 Mar 2024 14:00:01 +1300
12+
13 android-platform-external-nist-sip (9.0.0+r35-1.1) unstable; urgency=medium
14
15 * Non-maintainer upload.
16diff --git a/debian/control b/debian/control
17index 11dc1d5..141f8bc 100644
18--- a/debian/control
19+++ b/debian/control
20@@ -1,7 +1,8 @@
21 Source: android-platform-external-nist-sip
22 Section: java
23 Priority: optional
24-Maintainer: Android Tools Maintainers <android-tools-devel@lists.alioth.debian.org>
25+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
26+XSBC-Original-Maintainer: Android Tools Maintainers <android-tools-devel@lists.alioth.debian.org>
27 Uploaders: Katerina <ykaterina0319@gmail.com>
28 Build-Depends: debhelper (>=12),
29 default-jdk-headless,
30diff --git a/debian/patches/java21-update-list-api.patch b/debian/patches/java21-update-list-api.patch
31new file mode 100644
32index 0000000..9e7be2d
33--- /dev/null
34+++ b/debian/patches/java21-update-list-api.patch
35@@ -0,0 +1,55 @@
36+Description: workaround java.util.List changes in Java 21
37+ Java 21 adds removeFirst()/removeLast() and getFirst()/getLast() methods
38+ that are also defined in the class SIPHeader. Update method signatures
39+ to match Java 21 API.
40+Author: Vladimir Petko <vladimir.petko@canonical.com>
41+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/android-platform-external-nist-sip/+bug/2056086
42+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1065522
43+Frwarded: not-needed
44+Last-Update: 2024-03-06
45+
46+--- a/java/gov/nist/javax/sip/header/SIPHeaderList.java
47++++ b/java/gov/nist/javax/sip/header/SIPHeaderList.java
48+@@ -208,7 +208,7 @@
49+ *
50+ * @return SIPHeader first element of the list.
51+ */
52+- public Header getFirst() {
53++ public HDR getFirst() {
54+ if (hlist == null || hlist.isEmpty())
55+ return null;
56+ else
57+@@ -220,7 +220,7 @@
58+ *
59+ * @return SIPHeader last element of the list.
60+ */
61+- public Header getLast() {
62++ public HDR getLast() {
63+ if (hlist == null || hlist.isEmpty())
64+ return null;
65+ return hlist.get(hlist.size() - 1);
66+@@ -277,18 +277,19 @@
67+ /**
68+ * Remove the first element of this list.
69+ */
70+- public void removeFirst() {
71++ public HDR removeFirst() {
72+ if (hlist.size() != 0)
73+- hlist.remove(0);
74+-
75++ return hlist.remove(0);
76++ return null;
77+ }
78+
79+ /**
80+ * Remove the last element of this list.
81+ */
82+- public void removeLast() {
83++ public HDR removeLast() {
84+ if (hlist.size() != 0)
85+- hlist.remove(hlist.size() - 1);
86++ return hlist.remove(hlist.size() - 1);
87++ return null;
88+ }
89+
90+ /**
91diff --git a/debian/patches/series b/debian/patches/series
92new file mode 100644
93index 0000000..9589098
94--- /dev/null
95+++ b/debian/patches/series
96@@ -0,0 +1 @@
97+java21-update-list-api.patch

Subscribers

People subscribed via source and target branches