[jdk17u-dev] Integrated: 8327476: Upgrade JLine to 3.26.1

Goetz Lindenmaier goetz at openjdk.org
Tue Feb 25 16:17:06 UTC 2025


On Sat, 22 Feb 2025 19:21:58 GMT, Goetz Lindenmaier <goetz at openjdk.org> wrote:

> I backport this change for parity with 17.0.15-oracle.
> 
> It brings updates of upstream library jline 3.26.1 to jdk17.
> Jdk17 currently includes jline 3.22.0, see [JDK-8297587](https://bugs.openjdk.org/browse/JDK-8297587).
> The original sources of jline 3.26.1 can be found here:
> https://github.com/jline/jline3/archive/refs/tags/jline-parent-3.26.1.tar.gz
> 
> The backport of this change needed some adaptions.
> 
> The original jline library dynamically selects how to access
> the operating system in two means:
> 
>     Which operating system? linux, windows, mac?
>     JDK functionality to do native calls: JNI, jna, ffm?
> 
> The implementation in OpenJDK does this selection at JDK build time.
> The code is split into more subdirectories for the operating systems.
> One of the methods to call native is picked, the code for the others
> is removed. Unfortunately this differs for the JDK releases:
> 
> jdk23 uses ffm.
> jdk21 uses jna.
> jdk17 uses jna on windows, "exec" on the remaining OSes.
> 
> "[8306983](https://bugs.openjdk.org/browse/JDK-8306983): Do not invoke external programs when switch terminal to raw mode on selected platforms"
> implemented the jna access for unix etc. in 21.
> 
> Because of these differences I had to adapt the change when
> backporting from 23 to 21, and now I need to do so again.
> 
> I am basing my backport to 17 on the commit of this change in 21.
> 
> First, I just drop the changes to the files not in 17 that were added by [8306983](https://bugs.openjdk.org/browse/JDK-8306983):
> 
> aix/classes/jdk/internal/org/jline/terminal/impl/jna/JDKNativePty.java
> linux/classes/jdk/internal/org/jline/terminal/impl/jna/JDKNativePty.java
> linux/classes/jdk/internal/org/jline/terminal/impl/jna/linux/CLibrary.java
> linux/classes/jdk/internal/org/jline/terminal/impl/jna/linux/LinuxNativePty.java
> macosx/classes/jdk/internal/org/jline/terminal/impl/jna/JDKNativePty.java
> macosx/classes/jdk/internal/org/jline/terminal/impl/jna/osx/CLibrary.java
> macosx/classes/jdk/internal/org/jline/terminal/impl/jna/osx/OsXNativePty.java
> unix/classes/jdk/internal/org/jline/terminal/impl/jna/JnaNativePty.java
> unix/classes/jdk/internal/org/jline/terminal/impl/jna/JnaTerminalProvider.java
> 
> 
> The remaining patch applied quite well, I only had to
> resolve the following files:
> 
> src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/Buffer.java
> src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/LineReader.java
> src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/BufferImpl.java
> src/jdk.internal...

This pull request has now been integrated.

Changeset: bb391d7a
Author:    Goetz Lindenmaier <goetz at openjdk.org>
URL:       https://git.openjdk.org/jdk17u-dev/commit/bb391d7a3656eda8864b777a9561a9e7e71a47a9
Stats:     6144 lines in 117 files changed: 2859 ins; 1016 del; 2269 mod

8327476: Upgrade JLine to 3.26.1

Reviewed-by: mdoerr
Backport-of: d02ad34144917a36911296b20ce28381ead3f601

-------------

PR: https://git.openjdk.org/jdk17u-dev/pull/3292


More information about the jdk-updates-dev mailing list