Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package jline3 for openSUSE:Factory checked in at 2026-05-12 19:26:43 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/jline3 (Old) and /work/SRC/openSUSE:Factory/.jline3.new.1966 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "jline3" Tue May 12 19:26:43 2026 rev:11 rq:1352503 version:3.30.13 Changes: -------- --- /work/SRC/openSUSE:Factory/jline3/jline3.changes 2026-04-29 19:22:15.419925173 +0200 +++ /work/SRC/openSUSE:Factory/.jline3.new.1966/jline3.changes 2026-05-12 19:27:20.804774248 +0200 @@ -1,0 +2,10 @@ +Sun May 10 21:05:01 UTC 2026 - Fridrich Strba <[email protected]> + +- Update to upstream version 3.30.13 + * Bug Fixes + + fix: correct inverted bounds check in readBuffered methods + + fix: remove proactive isNativeAccessEnabled() checks from + terminal providers + + fix: status bar duplication after vertical resize + +------------------------------------------------------------------- Old: ---- jline-3.30.11.tar.gz New: ---- jline-3.30.13.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ jline3.spec ++++++ --- /var/tmp/diff_new_pack.nMF4hJ/_old 2026-05-12 19:27:21.384798285 +0200 +++ /var/tmp/diff_new_pack.nMF4hJ/_new 2026-05-12 19:27:21.388798451 +0200 @@ -31,7 +31,7 @@ %endif %bcond_with ssh Name: jline3 -Version: 3.30.11 +Version: 3.30.13 Release: 0 Summary: Java library for handling console input License: BSD-3-Clause ++++++ _scmsync.obsinfo ++++++ --- /var/tmp/diff_new_pack.nMF4hJ/_old 2026-05-12 19:27:21.428800109 +0200 +++ /var/tmp/diff_new_pack.nMF4hJ/_new 2026-05-12 19:27:21.432800275 +0200 @@ -1,6 +1,6 @@ -mtime: 1777464596 -commit: cbab654759a8c9ec45e8f49a3f41a8e8ad35ecbf65e303881c30eeac23ebff44 +mtime: 1778447304 +commit: d966377854883ad215f54b20da9dcb090c1cd9a0d89ae167260943418b55ea0f url: https://src.opensuse.org/java-packages/jline3 -revision: cbab654759a8c9ec45e8f49a3f41a8e8ad35ecbf65e303881c30eeac23ebff44 +revision: d966377854883ad215f54b20da9dcb090c1cd9a0d89ae167260943418b55ea0f projectscmsync: https://src.opensuse.org/java-packages/_ObsPrj ++++++ build.specials.obscpio ++++++ ++++++ build.specials.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.gitignore new/.gitignore --- old/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/.gitignore 2026-05-10 23:08:24.000000000 +0200 @@ -0,0 +1 @@ +.osc ++++++ jline-3.30.11.tar.gz -> jline-3.30.13.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jline3-jline-3.30.11/.github/workflows/master-build.yml new/jline3-jline-3.30.13/.github/workflows/master-build.yml --- old/jline3-jline-3.30.11/.github/workflows/master-build.yml 2026-04-27 17:00:09.000000000 +0200 +++ new/jline3-jline-3.30.13/.github/workflows/master-build.yml 2026-05-04 21:20:27.000000000 +0200 @@ -65,7 +65,7 @@ matrix: os: [ ubuntu-latest, macos-latest ] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up GraalVM uses: graalvm/setup-graalvm@v1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jline3-jline-3.30.11/builtins/pom.xml new/jline3-jline-3.30.13/builtins/pom.xml --- old/jline3-jline-3.30.11/builtins/pom.xml 2026-04-27 17:00:09.000000000 +0200 +++ new/jline3-jline-3.30.13/builtins/pom.xml 2026-05-04 21:20:27.000000000 +0200 @@ -16,7 +16,7 @@ <parent> <groupId>org.jline</groupId> <artifactId>jline-parent</artifactId> - <version>3.30.11</version> + <version>3.30.13</version> </parent> <artifactId>jline-builtins</artifactId> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jline3-jline-3.30.11/console/pom.xml new/jline3-jline-3.30.13/console/pom.xml --- old/jline3-jline-3.30.11/console/pom.xml 2026-04-27 17:00:09.000000000 +0200 +++ new/jline3-jline-3.30.13/console/pom.xml 2026-05-04 21:20:27.000000000 +0200 @@ -16,7 +16,7 @@ <parent> <groupId>org.jline</groupId> <artifactId>jline-parent</artifactId> - <version>3.30.11</version> + <version>3.30.13</version> </parent> <artifactId>jline-console</artifactId> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jline3-jline-3.30.11/console-ui/pom.xml new/jline3-jline-3.30.13/console-ui/pom.xml --- old/jline3-jline-3.30.11/console-ui/pom.xml 2026-04-27 17:00:09.000000000 +0200 +++ new/jline3-jline-3.30.13/console-ui/pom.xml 2026-05-04 21:20:27.000000000 +0200 @@ -5,7 +5,7 @@ <parent> <groupId>org.jline</groupId> <artifactId>jline-parent</artifactId> - <version>3.30.11</version> + <version>3.30.13</version> </parent> <artifactId>jline-console-ui</artifactId> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jline3-jline-3.30.11/curses/pom.xml new/jline3-jline-3.30.13/curses/pom.xml --- old/jline3-jline-3.30.11/curses/pom.xml 2026-04-27 17:00:09.000000000 +0200 +++ new/jline3-jline-3.30.13/curses/pom.xml 2026-05-04 21:20:27.000000000 +0200 @@ -16,7 +16,7 @@ <parent> <groupId>org.jline</groupId> <artifactId>jline-parent</artifactId> - <version>3.30.11</version> + <version>3.30.13</version> </parent> <artifactId>jline-curses</artifactId> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jline3-jline-3.30.11/demo/pom.xml new/jline3-jline-3.30.13/demo/pom.xml --- old/jline3-jline-3.30.11/demo/pom.xml 2026-04-27 17:00:09.000000000 +0200 +++ new/jline3-jline-3.30.13/demo/pom.xml 2026-05-04 21:20:27.000000000 +0200 @@ -16,7 +16,7 @@ <parent> <groupId>org.jline</groupId> <artifactId>jline-parent</artifactId> - <version>3.30.11</version> + <version>3.30.13</version> </parent> <artifactId>jline-demo</artifactId> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jline3-jline-3.30.11/graal/pom.xml new/jline3-jline-3.30.13/graal/pom.xml --- old/jline3-jline-3.30.11/graal/pom.xml 2026-04-27 17:00:09.000000000 +0200 +++ new/jline3-jline-3.30.13/graal/pom.xml 2026-05-04 21:20:27.000000000 +0200 @@ -16,7 +16,7 @@ <parent> <groupId>org.jline</groupId> <artifactId>jline-parent</artifactId> - <version>3.30.11</version> + <version>3.30.13</version> </parent> <artifactId>jline-graal</artifactId> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jline3-jline-3.30.11/groovy/pom.xml new/jline3-jline-3.30.13/groovy/pom.xml --- old/jline3-jline-3.30.11/groovy/pom.xml 2026-04-27 17:00:09.000000000 +0200 +++ new/jline3-jline-3.30.13/groovy/pom.xml 2026-05-04 21:20:27.000000000 +0200 @@ -14,7 +14,7 @@ <parent> <groupId>org.jline</groupId> <artifactId>jline-parent</artifactId> - <version>3.30.11</version> + <version>3.30.13</version> </parent> <artifactId>jline-groovy</artifactId> <name>JLine Groovy</name> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jline3-jline-3.30.11/jansi/pom.xml new/jline3-jline-3.30.13/jansi/pom.xml --- old/jline3-jline-3.30.11/jansi/pom.xml 2026-04-27 17:00:09.000000000 +0200 +++ new/jline3-jline-3.30.13/jansi/pom.xml 2026-05-04 21:20:27.000000000 +0200 @@ -16,7 +16,7 @@ <parent> <groupId>org.jline</groupId> <artifactId>jline-parent</artifactId> - <version>3.30.11</version> + <version>3.30.13</version> </parent> <artifactId>jansi</artifactId> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jline3-jline-3.30.11/jansi-core/pom.xml new/jline3-jline-3.30.13/jansi-core/pom.xml --- old/jline3-jline-3.30.11/jansi-core/pom.xml 2026-04-27 17:00:09.000000000 +0200 +++ new/jline3-jline-3.30.13/jansi-core/pom.xml 2026-05-04 21:20:27.000000000 +0200 @@ -16,7 +16,7 @@ <parent> <groupId>org.jline</groupId> <artifactId>jline-parent</artifactId> - <version>3.30.11</version> + <version>3.30.13</version> </parent> <artifactId>jansi-core</artifactId> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jline3-jline-3.30.11/jline/pom.xml new/jline3-jline-3.30.13/jline/pom.xml --- old/jline3-jline-3.30.11/jline/pom.xml 2026-04-27 17:00:09.000000000 +0200 +++ new/jline3-jline-3.30.13/jline/pom.xml 2026-05-04 21:20:27.000000000 +0200 @@ -16,7 +16,7 @@ <parent> <groupId>org.jline</groupId> <artifactId>jline-parent</artifactId> - <version>3.30.11</version> + <version>3.30.13</version> </parent> <artifactId>jline</artifactId> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jline3-jline-3.30.11/native/pom.xml new/jline3-jline-3.30.13/native/pom.xml --- old/jline3-jline-3.30.11/native/pom.xml 2026-04-27 17:00:09.000000000 +0200 +++ new/jline3-jline-3.30.13/native/pom.xml 2026-05-04 21:20:27.000000000 +0200 @@ -15,7 +15,7 @@ <parent> <groupId>org.jline</groupId> <artifactId>jline-parent</artifactId> - <version>3.30.11</version> + <version>3.30.13</version> </parent> <artifactId>jline-native</artifactId> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jline3-jline-3.30.11/pom.xml new/jline3-jline-3.30.13/pom.xml --- old/jline3-jline-3.30.11/pom.xml 2026-04-27 17:00:09.000000000 +0200 +++ new/jline3-jline-3.30.13/pom.xml 2026-05-04 21:20:27.000000000 +0200 @@ -15,7 +15,7 @@ <groupId>org.jline</groupId> <artifactId>jline-parent</artifactId> - <version>3.30.11</version> + <version>3.30.13</version> <packaging>pom</packaging> <name>JLine</name> <description>JLine</description> @@ -74,7 +74,7 @@ <scm child.scm.connection.inherit.append.path="false" child.scm.developerConnection.inherit.append.path="false" child.scm.url.inherit.append.path="false"> <connection>scm:git:https://github.com/jline/jline3.git</connection> <developerConnection>scm:git:https://github.com/jline/jline3.git</developerConnection> - <tag>jline-3.30.11</tag> + <tag>jline-3.30.13</tag> <url>https://github.com/jline/jline3</url> </scm> @@ -98,7 +98,7 @@ <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <project.build.outputTimestamp>2026-04-27T14:57:59Z</project.build.outputTimestamp> + <project.build.outputTimestamp>2026-05-04T19:18:16Z</project.build.outputTimestamp> <java.build.version>22</java.build.version> <java.release.version>8</java.release.version> @@ -112,7 +112,7 @@ <juniversalchardet.version>1.0.3</juniversalchardet.version> <sshd.version>2.17.1</sshd.version> <easymock.version>5.6.0</easymock.version> - <junit.version>5.14.3</junit.version> + <junit.version>5.14.4</junit.version> <gogo.runtime.version>1.1.6</gogo.runtime.version> <gogo.jline.version>1.1.8</gogo.jline.version> <slf4j.version>2.0.17</slf4j.version> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jline3-jline-3.30.11/reader/pom.xml new/jline3-jline-3.30.13/reader/pom.xml --- old/jline3-jline-3.30.11/reader/pom.xml 2026-04-27 17:00:09.000000000 +0200 +++ new/jline3-jline-3.30.13/reader/pom.xml 2026-05-04 21:20:27.000000000 +0200 @@ -16,7 +16,7 @@ <parent> <groupId>org.jline</groupId> <artifactId>jline-parent</artifactId> - <version>3.30.11</version> + <version>3.30.13</version> </parent> <artifactId>jline-reader</artifactId> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jline3-jline-3.30.11/remote-ssh/pom.xml new/jline3-jline-3.30.13/remote-ssh/pom.xml --- old/jline3-jline-3.30.11/remote-ssh/pom.xml 2026-04-27 17:00:09.000000000 +0200 +++ new/jline3-jline-3.30.13/remote-ssh/pom.xml 2026-05-04 21:20:27.000000000 +0200 @@ -16,7 +16,7 @@ <parent> <groupId>org.jline</groupId> <artifactId>jline-parent</artifactId> - <version>3.30.11</version> + <version>3.30.13</version> </parent> <artifactId>jline-remote-ssh</artifactId> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jline3-jline-3.30.11/remote-telnet/pom.xml new/jline3-jline-3.30.13/remote-telnet/pom.xml --- old/jline3-jline-3.30.11/remote-telnet/pom.xml 2026-04-27 17:00:09.000000000 +0200 +++ new/jline3-jline-3.30.13/remote-telnet/pom.xml 2026-05-04 21:20:27.000000000 +0200 @@ -16,7 +16,7 @@ <parent> <groupId>org.jline</groupId> <artifactId>jline-parent</artifactId> - <version>3.30.11</version> + <version>3.30.13</version> </parent> <artifactId>jline-remote-telnet</artifactId> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jline3-jline-3.30.11/style/pom.xml new/jline3-jline-3.30.13/style/pom.xml --- old/jline3-jline-3.30.11/style/pom.xml 2026-04-27 17:00:09.000000000 +0200 +++ new/jline3-jline-3.30.13/style/pom.xml 2026-05-04 21:20:27.000000000 +0200 @@ -16,7 +16,7 @@ <parent> <groupId>org.jline</groupId> <artifactId>jline-parent</artifactId> - <version>3.30.11</version> + <version>3.30.13</version> </parent> <artifactId>jline-style</artifactId> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jline3-jline-3.30.11/terminal/pom.xml new/jline3-jline-3.30.13/terminal/pom.xml --- old/jline3-jline-3.30.11/terminal/pom.xml 2026-04-27 17:00:09.000000000 +0200 +++ new/jline3-jline-3.30.13/terminal/pom.xml 2026-05-04 21:20:27.000000000 +0200 @@ -16,7 +16,7 @@ <parent> <groupId>org.jline</groupId> <artifactId>jline-parent</artifactId> - <version>3.30.11</version> + <version>3.30.13</version> </parent> <artifactId>jline-terminal</artifactId> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jline3-jline-3.30.11/terminal/src/main/java/org/jline/terminal/impl/exec/ExecTerminalProvider.java new/jline3-jline-3.30.13/terminal/src/main/java/org/jline/terminal/impl/exec/ExecTerminalProvider.java --- old/jline3-jline-3.30.11/terminal/src/main/java/org/jline/terminal/impl/exec/ExecTerminalProvider.java 2026-04-27 17:00:09.000000000 +0200 +++ new/jline3-jline-3.30.13/terminal/src/main/java/org/jline/terminal/impl/exec/ExecTerminalProvider.java 2026-05-04 21:20:27.000000000 +0200 @@ -14,7 +14,6 @@ import java.io.OutputStream; import java.lang.reflect.Constructor; import java.lang.reflect.Field; -import java.lang.reflect.Method; import java.nio.charset.Charset; import org.jline.nativ.JLineLibrary; @@ -680,7 +679,6 @@ static class NativeRedirectPipeCreator implements RedirectPipeCreator { public NativeRedirectPipeCreator() { - checkNativeAccess(); // Force load the library JLineNativeLoader.initialize(); } @@ -691,46 +689,6 @@ } } - /** - * Checks that native access is enabled for this module. - * JNI native access restrictions are only enforced from JDK 24+, so the check - * is skipped on earlier versions. Uses reflection because - * {@code Module.isNativeAccessEnabled()} is not available on all JDK versions. - * - * @throws UnsupportedOperationException if native access is not enabled - */ - static void checkNativeAccess() { - // JNI native access restrictions are only enforced starting from JDK 24. - // Some JDK 21 builds (e.g. 21.0.10) backported Module.isNativeAccessEnabled(), - // but it returns false even though JNI works fine without --enable-native-access. - // See https://github.com/jline/jline3/issues/1689 - try { - int version = Integer.parseInt(System.getProperty("java.specification.version")); - if (version < 24) { - return; - } - } catch (NumberFormatException e) { - // JDK 8 uses "1.8" format, which means JDK < 24 - return; - } - try { - Method getModule = Class.class.getMethod("getModule"); - Object module = getModule.invoke(ExecTerminalProvider.class); - Method isNativeAccessEnabled = module.getClass().getMethod("isNativeAccessEnabled"); - Boolean enabled = (Boolean) isNativeAccessEnabled.invoke(module); - if (!enabled) { - throw new UnsupportedOperationException( - "Native access is not enabled for the current module: " + module); - } - } catch (NoSuchMethodException e) { - // Method not available, no native access restrictions - } catch (UnsupportedOperationException e) { - throw e; - } catch (ReflectiveOperationException e) { - // Unexpected reflection error, proceed anyway - } - } - @Override public String toString() { return "TerminalProvider[" + name() + "]"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jline3-jline-3.30.11/terminal/src/main/java/org/jline/utils/NonBlockingInputStream.java new/jline3-jline-3.30.13/terminal/src/main/java/org/jline/utils/NonBlockingInputStream.java --- old/jline3-jline-3.30.11/terminal/src/main/java/org/jline/utils/NonBlockingInputStream.java 2026-04-27 17:00:09.000000000 +0200 +++ new/jline3-jline-3.30.13/terminal/src/main/java/org/jline/utils/NonBlockingInputStream.java 2026-05-04 21:20:27.000000000 +0200 @@ -222,7 +222,7 @@ public int readBuffered(byte[] b, int off, int len, long timeout) throws IOException { if (b == null) { throw new NullPointerException(); - } else if (off < 0 || len < 0 || off + len < b.length) { + } else if (off < 0 || len < 0 || len > b.length - off) { throw new IllegalArgumentException(); } else if (len == 0) { return 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jline3-jline-3.30.11/terminal/src/main/java/org/jline/utils/NonBlockingPumpReader.java new/jline3-jline-3.30.13/terminal/src/main/java/org/jline/utils/NonBlockingPumpReader.java --- old/jline3-jline-3.30.11/terminal/src/main/java/org/jline/utils/NonBlockingPumpReader.java 2026-04-27 17:00:09.000000000 +0200 +++ new/jline3-jline-3.30.13/terminal/src/main/java/org/jline/utils/NonBlockingPumpReader.java 2026-05-04 21:20:27.000000000 +0200 @@ -110,7 +110,7 @@ public int readBuffered(char[] b, int off, int len, long timeout) throws IOException { if (b == null) { throw new NullPointerException(); - } else if (off < 0 || len < 0 || off + len < b.length) { + } else if (off < 0 || len < 0 || len > b.length - off) { throw new IllegalArgumentException(); } else if (len == 0) { return 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jline3-jline-3.30.11/terminal/src/main/java/org/jline/utils/Status.java new/jline3-jline-3.30.13/terminal/src/main/java/org/jline/utils/Status.java --- old/jline3-jline-3.30.11/terminal/src/main/java/org/jline/utils/Status.java 2026-04-27 17:00:09.000000000 +0200 +++ new/jline3-jline-3.30.13/terminal/src/main/java/org/jline/utils/Status.java 2026-05-04 21:20:27.000000000 +0200 @@ -149,6 +149,13 @@ clearStart = Math.min(clearStart, oldScrollRegion + 1); } if (effectiveLines > 0) { + // When the terminal height shrinks, some terminal emulators + // preserve the old bottom status line just above the new + // status area. Clear one status-height band above the + // status area so the next redraw does not leave duplicates. + if (newRows < oldRows) { + clearStart = Math.min(clearStart, Math.max(0, scrollRegion + 1 - effectiveLines)); + } // Account for wrapped status lines when width decreased if (display.columns < oldColumns) { int wrappedPerLine = (oldColumns + display.columns - 1) / display.columns; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jline3-jline-3.30.11/terminal-ffm/pom.xml new/jline3-jline-3.30.13/terminal-ffm/pom.xml --- old/jline3-jline-3.30.11/terminal-ffm/pom.xml 2026-04-27 17:00:09.000000000 +0200 +++ new/jline3-jline-3.30.13/terminal-ffm/pom.xml 2026-05-04 21:20:27.000000000 +0200 @@ -16,7 +16,7 @@ <parent> <groupId>org.jline</groupId> <artifactId>jline-parent</artifactId> - <version>3.30.11</version> + <version>3.30.13</version> </parent> <artifactId>jline-terminal-ffm</artifactId> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jline3-jline-3.30.11/terminal-ffm/src/main/java/org/jline/terminal/impl/ffm/FfmTerminalProvider.java new/jline3-jline-3.30.13/terminal-ffm/src/main/java/org/jline/terminal/impl/ffm/FfmTerminalProvider.java --- old/jline3-jline-3.30.11/terminal-ffm/src/main/java/org/jline/terminal/impl/ffm/FfmTerminalProvider.java 2026-04-27 17:00:09.000000000 +0200 +++ new/jline3-jline-3.30.13/terminal-ffm/src/main/java/org/jline/terminal/impl/ffm/FfmTerminalProvider.java 2026-05-04 21:20:27.000000000 +0200 @@ -14,6 +14,7 @@ import java.io.OutputStream; import java.lang.foreign.MemoryLayout; import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.foreign.MemorySegment; import java.lang.invoke.MethodHandles; import java.lang.invoke.VarHandle; import java.nio.charset.Charset; @@ -31,10 +32,18 @@ public class FfmTerminalProvider implements TerminalProvider { + @SuppressWarnings("restricted") public FfmTerminalProvider() { - if (!FfmTerminalProvider.class.getModule().isNativeAccessEnabled()) { + // Probe restricted FFM access so the provider fails at load time + // when native access is denied (JDK 26+), rather than later during use. + // On JDK 24-25, this succeeds with a JVM warning. + try { + MemorySegment.NULL.reinterpret(0); + } catch (UnsupportedOperationException | IllegalCallerException e) { throw new UnsupportedOperationException( - "Native access is not enabled for the current module: " + FfmTerminalProvider.class.getModule()); + "FFM native access is not available. Use --enable-native-access=ALL-UNNAMED or" + + " --enable-native-access=org.jline.terminal.ffm to enable it.", + e); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jline3-jline-3.30.11/terminal-jansi/pom.xml new/jline3-jline-3.30.13/terminal-jansi/pom.xml --- old/jline3-jline-3.30.11/terminal-jansi/pom.xml 2026-04-27 17:00:09.000000000 +0200 +++ new/jline3-jline-3.30.13/terminal-jansi/pom.xml 2026-05-04 21:20:27.000000000 +0200 @@ -16,7 +16,7 @@ <parent> <groupId>org.jline</groupId> <artifactId>jline-parent</artifactId> - <version>3.30.11</version> + <version>3.30.13</version> </parent> <artifactId>jline-terminal-jansi</artifactId> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jline3-jline-3.30.11/terminal-jna/pom.xml new/jline3-jline-3.30.13/terminal-jna/pom.xml --- old/jline3-jline-3.30.11/terminal-jna/pom.xml 2026-04-27 17:00:09.000000000 +0200 +++ new/jline3-jline-3.30.13/terminal-jna/pom.xml 2026-05-04 21:20:27.000000000 +0200 @@ -16,7 +16,7 @@ <parent> <groupId>org.jline</groupId> <artifactId>jline-parent</artifactId> - <version>3.30.11</version> + <version>3.30.13</version> </parent> <artifactId>jline-terminal-jna</artifactId> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jline3-jline-3.30.11/terminal-jni/pom.xml new/jline3-jline-3.30.13/terminal-jni/pom.xml --- old/jline3-jline-3.30.11/terminal-jni/pom.xml 2026-04-27 17:00:09.000000000 +0200 +++ new/jline3-jline-3.30.13/terminal-jni/pom.xml 2026-05-04 21:20:27.000000000 +0200 @@ -16,7 +16,7 @@ <parent> <groupId>org.jline</groupId> <artifactId>jline-parent</artifactId> - <version>3.30.11</version> + <version>3.30.13</version> </parent> <artifactId>jline-terminal-jni</artifactId> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jline3-jline-3.30.11/terminal-jni/src/main/java/org/jline/terminal/impl/jni/JniTerminalProvider.java new/jline3-jline-3.30.13/terminal-jni/src/main/java/org/jline/terminal/impl/jni/JniTerminalProvider.java --- old/jline3-jline-3.30.11/terminal-jni/src/main/java/org/jline/terminal/impl/jni/JniTerminalProvider.java 2026-04-27 17:00:09.000000000 +0200 +++ new/jline3-jline-3.30.13/terminal-jni/src/main/java/org/jline/terminal/impl/jni/JniTerminalProvider.java 2026-05-04 21:20:27.000000000 +0200 @@ -11,7 +11,6 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import java.lang.reflect.Method; import java.nio.charset.Charset; import org.jline.nativ.JLineNativeLoader; @@ -56,56 +55,21 @@ /** * Creates a new JNI terminal provider instance and ensures the native library is loaded. * <p> - * The constructor first checks that native access is enabled for this module. On JDK 22+, - * calling {@code System.load()} without {@code --enable-native-access} produces a warning - * (JDK 24+) or throws {@code IllegalCallerException} (JDK 26+). By checking upfront, this - * provider fails cleanly and allows {@link TerminalBuilder} to fall back to other providers. - * - * @throws UnsupportedOperationException if native access is not enabled for this module + * Loading the native library via {@link JLineNativeLoader#initialize()} calls + * {@code System.loadLibrary()}, which is a restricted operation. On JDK 24-25 this + * produces a JVM warning when {@code --enable-native-access} is not set. On future JDKs + * where native access is denied by default, the load will fail and + * {@link TerminalBuilder} will fall back to other providers. */ public JniTerminalProvider() { - checkNativeAccess(); // Ensure the native library is loaded - JLineNativeLoader.initialize(); - } - - /** - * Checks that native access is enabled for this module. - * JNI native access restrictions are only enforced from JDK 24+, so the check - * is skipped on earlier versions. Uses reflection because - * {@code Module.isNativeAccessEnabled()} is not available on all JDK versions. - * - * @throws UnsupportedOperationException if native access is not enabled - */ - static void checkNativeAccess() { - // JNI native access restrictions are only enforced starting from JDK 24. - // Some JDK 21 builds (e.g. 21.0.10) backported Module.isNativeAccessEnabled(), - // but it returns false even though JNI works fine without --enable-native-access. - // See https://github.com/jline/jline3/issues/1689 - try { - int version = Integer.parseInt(System.getProperty("java.specification.version")); - if (version < 24) { - return; - } - } catch (NumberFormatException e) { - // JDK 8 uses "1.8" format, which means JDK < 24 - return; - } try { - Method getModule = Class.class.getMethod("getModule"); - Object module = getModule.invoke(JniTerminalProvider.class); - Method isNativeAccessEnabled = module.getClass().getMethod("isNativeAccessEnabled"); - Boolean enabled = (Boolean) isNativeAccessEnabled.invoke(module); - if (!enabled) { - throw new UnsupportedOperationException( - "Native access is not enabled for the current module: " + module); - } - } catch (NoSuchMethodException e) { - // Method not available, no native access restrictions - } catch (UnsupportedOperationException e) { - throw e; - } catch (ReflectiveOperationException e) { - // Unexpected reflection error, proceed anyway + JLineNativeLoader.initialize(); + } catch (Exception e) { + throw new UnsupportedOperationException( + "JNI native access is not available. Use --enable-native-access=ALL-UNNAMED or" + + " --enable-native-access=org.jline.terminal.jni to enable it.", + e); } } ++++++ jline3-build.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/common.xml new/common.xml --- old/common.xml 2026-04-29 13:46:15.496759810 +0200 +++ new/common.xml 2026-05-10 22:57:47.778799681 +0200 @@ -3,7 +3,7 @@ <project name="common" basedir="."> <property file="build.properties"/> - <property name="project.version" value="3.30.11"/> + <property name="project.version" value="3.30.13"/> <property name="project.groupId" value="org.jline"/> <property name="project.url" value="https://github.com/jline/jline3"/>
