This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-daemon.git
The following commit(s) were added to refs/heads/master by this push: new 0589362 Fix first appearance of --enable-native-access (#259) 0589362 is described below commit 0589362e90a6136811f326f84381794c54f5a812 Author: Michael Osipov <micha...@apache.org> AuthorDate: Tue May 6 00:45:07 2025 +0200 Fix first appearance of --enable-native-access (#259) As it turns out '--enable-native-access' is not reported by 'java -help', but appeared first in Java 17: https://github.com/openjdk/jdk17u/blob/af0de21b9bac2b593e2b50703e2995cd7a9cfb42/src/java.base/share/native/libjli/java.c#L600 --- src/changes/changes.xml | 1 + src/native/unix/native/arguments.c | 2 +- src/native/unix/native/help.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 7148406..6be2505 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -44,6 +44,7 @@ <!-- FIX --> <action type="fix" dev="ggregory" due-to="Gary Gregory">Remove -nouses directive from maven-bundle-plugin. OSGi package imports now state 'uses' definitions for package imports, this doesn't affect JPMS (from org.apache.commons:commons-parent:80).</action> <action type="fix" dev="michaelo">Document --enable-preview</action> + <action type="fix" dev="michaelo">Fix first appearance of --enable-native-access</action> <!-- ADD --> <action issue="DAEMON-471" dev="michaelo" type="add">Add support for --enable-native-access Java startup option in jsvc.</action> <!-- UPDATE --> diff --git a/src/native/unix/native/arguments.c b/src/native/unix/native/arguments.c index 458e802..2e2b3ad 100644 --- a/src/native/unix/native/arguments.c +++ b/src/native/unix/native/arguments.c @@ -426,7 +426,7 @@ static arg_data *parse(int argc, char *argv[]) else if (!strncmp(argv[x], "--enable-preview", 16)) { args->opts[args->onum++] = strdup(argv[x]); } - /* Java 21 specific options */ + /* Java 17 specific options */ else if (!strncmp(argv[x], "--enable-native-access=", 23)) { args->opts[args->onum++] = strdup(argv[x]); } diff --git a/src/native/unix/native/help.c b/src/native/unix/native/help.c index f7d9ab6..6f6ac41 100644 --- a/src/native/unix/native/help.c +++ b/src/native/unix/native/help.c @@ -124,7 +124,7 @@ void help(home_data *data) printf(" --enable-preview\n"); printf(" Java 11 --enable-preview option. Passed as it is to JVM\n"); printf(" --enable-native-access=<module name>\n"); - printf(" Java 21 --enable-native-access option. Passed as it is to JVM\n"); + printf(" Java 17 --enable-native-access option. Passed as it is to JVM\n"); printf("\njsvc (Apache Commons Daemon) " JSVC_VERSION_STRING "\n"); printf("Copyright (c) 1999-2025 Apache Software Foundation.\n");