Commit 32b955d
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 066befe commit 32b955d
File tree
2 files changed
+34
-8
lines changed- terminal-jni/src/main/java/org/jline/terminal/impl/jni
- terminal/src/main/java/org/jline/terminal/impl/exec
2 files changed
+34
-8
lines changedLines changed: 17 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
76 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
81 | 94 | | |
82 | 95 | | |
83 | 96 | | |
| |||
88 | 101 | | |
89 | 102 | | |
90 | 103 | | |
91 | | - | |
| 104 | + | |
92 | 105 | | |
93 | 106 | | |
94 | 107 | | |
| |||
Lines changed: 17 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
693 | 693 | | |
694 | 694 | | |
695 | 695 | | |
696 | | - | |
697 | | - | |
698 | | - | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
699 | 699 | | |
700 | 700 | | |
701 | 701 | | |
702 | 702 | | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
703 | 716 | | |
704 | 717 | | |
705 | 718 | | |
| |||
710 | 723 | | |
711 | 724 | | |
712 | 725 | | |
713 | | - | |
| 726 | + | |
714 | 727 | | |
715 | 728 | | |
716 | 729 | | |
| |||
0 commit comments