From a4eb9a063fb9e4a87923d464fe2c50ed5466acff Mon Sep 17 00:00:00 2001 From: Jaikiran Pai Date: Mon, 16 Sep 2024 08:34:54 +0000 Subject: [PATCH] 8339918: Remove checks for outdated -t -tm -Xfuture -checksource -cs -noasyncgc options from the launcher Reviewed-by: dholmes, alanb --- .../sun/launcher/resources/launcher.properties | 3 --- src/java.base/share/man/java.1 | 16 ++++++++++------ src/java.base/share/native/libjli/java.c | 14 +------------- .../com/sun/tools/example/debug/tty/TTY.java | 8 ++------ 4 files changed, 13 insertions(+), 28 deletions(-) diff --git a/src/java.base/share/classes/sun/launcher/resources/launcher.properties b/src/java.base/share/classes/sun/launcher/resources/launcher.properties index 71cdb161fc0..f493dfd36b6 100644 --- a/src/java.base/share/classes/sun/launcher/resources/launcher.properties +++ b/src/java.base/share/classes/sun/launcher/resources/launcher.properties @@ -141,9 +141,6 @@ java.launcher.X.usage=\n\ \ -Xcomp forces compilation of methods on first invocation\n\ \ -Xdebug does nothing; deprecated for removal in a future release.\n\ \ -Xdiag show additional diagnostic messages\n\ -\ -Xfuture enable strictest checks, anticipating future default.\n\ -\ This option is deprecated and may be removed in a\n\ -\ future release.\n\ \ -Xint interpreted mode execution only\n\ \ -Xinternalversion\n\ \ displays more detailed JVM version information than the\n\ diff --git a/src/java.base/share/man/java.1 b/src/java.base/share/man/java.1 index 58e4faf17c3..da7fb86099f 100644 --- a/src/java.base/share/man/java.1 +++ b/src/java.base/share/man/java.1 @@ -3749,12 +3749,6 @@ future JDK release. They\[aq]re still accepted and acted upon, but a warning is issued when they\[aq]re used. .TP -\f[V]-Xfuture\f[R] -Enables strict class-file format checks that enforce close conformance -to the class-file format specification. -Developers should use this flag when developing new code. -Stricter checks may become the default in future releases. -.TP \f[V]-Xloggc:\f[R]\f[I]filename\f[R] Sets the file to which verbose GC events information should be redirected for logging. @@ -3920,6 +3914,16 @@ of objects reachable from the old generation space into the young generation space. To disable GC of the young generation before each full GC, specify the option \f[V]-XX:-ScavengeBeforeFullGC\f[R]. +.TP +\f[V]-Xfuture\f[R] +Enables strict class-file format checks that enforce close conformance +to the class-file format specification. +Developers should use this flag when developing new code. +Stricter checks may become the default in future releases. +.RS +.PP +Use the option \f[V]-Xverify:all\f[R] instead. +.RE .PP For the lists and descriptions of options removed in previous releases see the \f[I]Removed Java Options\f[R] section in: diff --git a/src/java.base/share/native/libjli/java.c b/src/java.base/share/native/libjli/java.c index 1b4ece834d6..79bd0c4e233 100644 --- a/src/java.base/share/native/libjli/java.c +++ b/src/java.base/share/native/libjli/java.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1464,17 +1464,10 @@ ParseArguments(int *pargc, char ***pargv, return JNI_FALSE; } else if (JLI_StrCmp(arg, "-verbosegc") == 0) { AddOption("-verbose:gc", NULL); - } else if (JLI_StrCmp(arg, "-t") == 0) { - AddOption("-Xt", NULL); - } else if (JLI_StrCmp(arg, "-tm") == 0) { - AddOption("-Xtm", NULL); } else if (JLI_StrCmp(arg, "-debug") == 0) { JLI_ReportErrorMessage(ARG_DEPRECATED, "-debug"); } else if (JLI_StrCmp(arg, "-noclassgc") == 0) { AddOption("-Xnoclassgc", NULL); - } else if (JLI_StrCmp(arg, "-Xfuture") == 0) { - JLI_ReportErrorMessage(ARG_DEPRECATED, "-Xfuture"); - AddOption("-Xverify:all", NULL); } else if (JLI_StrCmp(arg, "-verify") == 0) { AddOption("-Xverify:all", NULL); } else if (JLI_StrCmp(arg, "-verifyremote") == 0) { @@ -1493,11 +1486,6 @@ ParseArguments(int *pargc, char ***pargv, char *tmp = JLI_MemAlloc(tmpSize); snprintf(tmp, tmpSize, "-X%s", arg + 1); /* skip '-' */ AddOption(tmp, NULL); - } else if (JLI_StrCmp(arg, "-checksource") == 0 || - JLI_StrCmp(arg, "-cs") == 0 || - JLI_StrCmp(arg, "-noasyncgc") == 0) { - /* No longer supported */ - JLI_ReportErrorMessage(ARG_WARN, arg); } else if (JLI_StrCCmp(arg, "-splash:") == 0) { ; /* Ignore machine independent options already handled */ } else if (JLI_StrCmp(arg, "--disable-@files") == 0) { diff --git a/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTY.java b/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTY.java index fcf9ed12166..acdd6c45f6e 100644 --- a/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTY.java +++ b/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTY.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -980,7 +980,6 @@ public class TTY implements EventNotifier { return; } else if ( // Standard VM options passed on - token.equals("-v") || token.startsWith("-v:") || // -v[:...] token.startsWith("-verbose") || // -verbose[:...] token.startsWith("-D") || // -classpath handled below @@ -988,12 +987,9 @@ public class TTY implements EventNotifier { token.startsWith("-X") || // Old-style options (These should remain in place as long as // the standard VM accepts them) - token.equals("-noasyncgc") || token.equals("-prof") || token.equals("-verify") || token.equals("-verifyremote") || - token.equals("-verbosegc") || - token.startsWith("-ms") || token.startsWith("-mx") || - token.startsWith("-ss") || token.startsWith("-oss") ) { + token.equals("-verbosegc")) { javaArgs = addArgument(javaArgs, token); } else if (token.startsWith("-R")) {