Commit 9532659
committed
fix: Skip JNI native access check on JDK < 24 (fixes #1689)
Module.isNativeAccessEnabled() was backported to some JDK 21 builds
(e.g. 21.0.10), causing a false UnsupportedOperationException since the
method returns false even though JNI works without --enable-native-access.
JNI native access restrictions are only enforced from JDK 24+, so skip
the check on earlier versions.1 parent 4e7d7e1 commit 9532659
File tree
2 files changed
+22
-7
lines changed- terminal-jni/src/main/java/org/jline/terminal/impl/jni
- terminal/src/main/java/org/jline/terminal/impl/exec
2 files changed
+22
-7
lines changedLines changed: 11 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
74 | | - | |
75 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
87 | 94 | | |
88 | 95 | | |
89 | 96 | | |
| |||
92 | 99 | | |
93 | 100 | | |
94 | 101 | | |
95 | | - | |
| 102 | + | |
96 | 103 | | |
97 | 104 | | |
98 | 105 | | |
| |||
Lines changed: 11 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
623 | 623 | | |
624 | 624 | | |
625 | 625 | | |
626 | | - | |
627 | | - | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
628 | 629 | | |
629 | 630 | | |
630 | 631 | | |
631 | 632 | | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
632 | 640 | | |
633 | 641 | | |
634 | 642 | | |
| |||
637 | 645 | | |
638 | 646 | | |
639 | 647 | | |
640 | | - | |
| 648 | + | |
641 | 649 | | |
642 | 650 | | |
643 | 651 | | |
| |||
0 commit comments