[Git][java-team/jline3][master] Fix the build failure with Java 21 (Closes: #1061529)
Emmanuel Bourg (@ebourg)
gitlab at salsa.debian.org
Thu Jul 11 12:00:50 BST 2024
Emmanuel Bourg pushed to branch master at Debian Java Maintainers / jline3
Commits:
9682ecbe by Vladimir Petko at 2024-07-11T11:00:38+00:00
Fix the build failure with Java 21 (Closes: #1061529)
- - - - -
3 changed files:
- debian/changelog
- + debian/patches/03-java21-compatibility.patch
- debian/patches/series
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+jline3 (3.3.1-4) UNRELEASED; urgency=medium
+
+ * d/p/03-java21-compatibility.patch: cherry-pick upstream patch to
+ resolve Java 21 ftbfs (Closes: #1061529).
+
+ -- Vladimir Petko <vladimir.petko at canonical.com> Fri, 26 Jan 2024 13:44:32 +1300
+
jline3 (3.3.1-3) unstable; urgency=medium
* Team upload.
=====================================
debian/patches/03-java21-compatibility.patch
=====================================
@@ -0,0 +1,136 @@
+Description: Support building on JDK 21
+ Workaround [this-escape] warnings raised for constructors calling methods that can be
+ overriden in a subclass.
+Author: Guillaume Nodet <gnodet at gmail.com>
+Origin: upstream, https://github.com/jline/jline3/commit/05ee05dbc7b9c5ba9df8358d8a9fc58227101ed0
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1061529
+Forwarded: not-needed
+Applied-Upstream: 05ee05dbc7b9c5ba9df8358d8a9fc58227101ed0
+Last-Update: 2024-01-26
+--- a/builtins/src/main/java/org/jline/builtins/Completers.java
++++ b/builtins/src/main/java/org/jline/builtins/Completers.java
+@@ -366,6 +366,7 @@
+ this(Arrays.asList(nodes));
+ }
+
++ @SuppressWarnings("this-escape")
+ public TreeCompleter(List<Node> nodes) {
+ StringBuilder sb = new StringBuilder();
+ addRoots(sb, nodes);
+--- a/builtins/src/main/java/org/jline/builtins/Tmux.java
++++ b/builtins/src/main/java/org/jline/builtins/Tmux.java
+@@ -188,6 +188,7 @@
+ Discard, SelfInsert, Mouse
+ }
+
++ @SuppressWarnings("this-escape")
+ public Tmux(Terminal terminal, PrintStream err, Consumer<Terminal> runner) throws IOException {
+ this.terminal = terminal;
+ this.err = err;
+--- a/reader/src/main/java/org/jline/reader/impl/LineReaderImpl.java
++++ b/reader/src/main/java/org/jline/reader/impl/LineReaderImpl.java
+@@ -205,7 +205,7 @@
+
+ protected KillRing killRing = new KillRing();
+
+- protected UndoTree<Buffer> undo = new UndoTree<>(this::setBuffer);
++ protected UndoTree<Buffer> undo;
+ protected boolean isUndo;
+
+ /*
+@@ -246,6 +246,7 @@
+ this(terminal, appName, null);
+ }
+
++ @SuppressWarnings("this-escape")
+ public LineReaderImpl(Terminal terminal, String appName, Map<String, Object> variables) {
+ Objects.requireNonNull(terminal, "terminal can not be null");
+ this.terminal = terminal;
+@@ -260,6 +261,7 @@
+ }
+ this.keyMaps = defaultKeyMaps();
+
++ undo = new UndoTree<>(this::setBuffer);
+ builtinWidgets = builtinWidgets();
+ widgets = new HashMap<>(builtinWidgets);
+ bindingReader = new BindingReader(terminal.reader());
+--- a/reader/src/main/java/org/jline/reader/impl/UndoTree.java
++++ b/reader/src/main/java/org/jline/reader/impl/UndoTree.java
+@@ -20,6 +20,7 @@
+ private final Node parent;
+ private Node current;
+
++ @SuppressWarnings("this-escape")
+ public UndoTree(Consumer<T> s) {
+ state = s;
+ parent = new Node(null);
+--- a/reader/src/main/java/org/jline/reader/impl/history/DefaultHistory.java
++++ b/reader/src/main/java/org/jline/reader/impl/history/DefaultHistory.java
+@@ -42,6 +42,7 @@
+ public DefaultHistory() {
+ }
+
++ @SuppressWarnings("this-escape")
+ public DefaultHistory(LineReader reader) {
+ attach(reader);
+ }
+--- a/remote-telnet/src/main/java/org/jline/builtins/telnet/ConnectionData.java
++++ b/remote-telnet/src/main/java/org/jline/builtins/telnet/ConnectionData.java
+@@ -81,6 +81,7 @@
+ *
+ * @param sock Socket of the inbound connection.
+ */
++ @SuppressWarnings("this-escape")
+ public ConnectionData(Socket sock, ConnectionManager cm) {
+ socket = sock;
+ connectionManager = cm;
+--- a/remote-telnet/src/main/java/org/jline/builtins/telnet/ConnectionManager.java
++++ b/remote-telnet/src/main/java/org/jline/builtins/telnet/ConnectionManager.java
+@@ -75,6 +75,7 @@
+ private boolean lineMode = false;
+ private boolean stopping = false;
+
++ @SuppressWarnings("this-escape")
+ public ConnectionManager() {
+ threadGroup = new ThreadGroup(toString() + "Connections");
+ closedConnections = new Stack<Connection>();
+--- a/terminal/src/main/java/org/jline/terminal/Attributes.java
++++ b/terminal/src/main/java/org/jline/terminal/Attributes.java
+@@ -138,6 +138,7 @@
+ public Attributes() {
+ }
+
++ @SuppressWarnings("this-escape")
+ public Attributes(Attributes attr) {
+ copy(attr);
+ }
+--- a/terminal/src/main/java/org/jline/terminal/Size.java
++++ b/terminal/src/main/java/org/jline/terminal/Size.java
+@@ -16,6 +16,7 @@
+ public Size() {
+ }
+
++ @SuppressWarnings("this-escape")
+ public Size(int columns, int rows) {
+ this();
+ setColumns(columns);
+--- a/terminal/src/main/java/org/jline/utils/Display.java
++++ b/terminal/src/main/java/org/jline/utils/Display.java
+@@ -44,6 +44,7 @@
+ protected final boolean delayedWrapAtEol;
+ protected final boolean cursorDownIsNewLine;
+
++ @SuppressWarnings("this-escape")
+ public Display(Terminal terminal, boolean fullscreen) {
+ this.terminal = terminal;
+ this.fullScreen = fullscreen;
+--- a/builtins/src/main/java/org/jline/builtins/Nano.java
++++ b/builtins/src/main/java/org/jline/builtins/Nano.java
+@@ -940,6 +940,7 @@
+ this(terminal, root.toPath());
+ }
+
++ @SuppressWarnings("this-escape")
+ public Nano(Terminal terminal, Path root) {
+ this.terminal = terminal;
+ this.root = root;
=====================================
debian/patches/series
=====================================
@@ -1,2 +1,3 @@
01-ignore-warnings.patch
02-ignore-remote-modules.patch
+03-java21-compatibility.patch
View it on GitLab: https://salsa.debian.org/java-team/jline3/-/commit/9682ecbe3a36596e2748d5720cc6903d6175f0ea
--
This project does not include diff previews in email notifications.
View it on GitLab: https://salsa.debian.org/java-team/jline3/-/commit/9682ecbe3a36596e2748d5720cc6903d6175f0ea
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20240711/c2b372a5/attachment.htm>
More information about the pkg-java-commits
mailing list