changeset 50042:9f2b32b87906

8202744: Expired flag removal for JDK 11 Reviewed-by: coleenp, jiangli
author dholmes
date Mon, 07 May 2018 21:48:28 -0400
parents 86c6968ff67a
children 2d1952d4d067
files src/hotspot/share/runtime/arguments.cpp test/hotspot/jtreg/runtime/CommandLine/ObsoleteFlagErrorMessage.java
diffstat 2 files changed, 6 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/runtime/arguments.cpp	Mon May 07 19:31:39 2018 -0400
+++ b/src/hotspot/share/runtime/arguments.cpp	Mon May 07 21:48:28 2018 -0400
@@ -527,9 +527,6 @@
   { "UnsyncloadClass",              JDK_Version::jdk(10), JDK_Version::jdk(11), JDK_Version::jdk(12) },
 
   // -------------- Obsolete Flags - sorted by expired_in --------------
-  { "ConvertSleepToYield",           JDK_Version::jdk(9),      JDK_Version::jdk(10), JDK_Version::jdk(11) },
-  { "ConvertYieldToSleep",           JDK_Version::jdk(9),      JDK_Version::jdk(10), JDK_Version::jdk(11) },
-  { "MinSleepInterval",              JDK_Version::jdk(9),      JDK_Version::jdk(10), JDK_Version::jdk(11) },
   { "CheckAssertionStatusDirectives",JDK_Version::undefined(), JDK_Version::jdk(11), JDK_Version::jdk(12) },
   { "PrintMallocFree",               JDK_Version::undefined(), JDK_Version::jdk(11), JDK_Version::jdk(12) },
   { "PrintMalloc",                   JDK_Version::undefined(), JDK_Version::jdk(11), JDK_Version::jdk(12) },
--- a/test/hotspot/jtreg/runtime/CommandLine/ObsoleteFlagErrorMessage.java	Mon May 07 19:31:39 2018 -0400
+++ b/test/hotspot/jtreg/runtime/CommandLine/ObsoleteFlagErrorMessage.java	Mon May 07 21:48:28 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2018, 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
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8060449 8073989
+ * @bug 8060449 8073989 8202744
  * @summary Newly obsolete command line options should still give useful error messages when used improperly.
  * @modules java.base/jdk.internal.misc
  * @library /test/lib
@@ -37,18 +37,18 @@
 
     // Case 1: Newly obsolete flags with extra junk appended should not be treated as newly obsolete (8060449)
     ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
-        "-XX:ConvertSleepToYieldPlusJunk", "-version");
+        "-XX:SafepointSpinBeforeYieldPlusJunk", "-version");
 
     OutputAnalyzer output = new OutputAnalyzer(pb.start());
-    output.shouldContain("Unrecognized VM option 'ConvertSleepToYieldPlusJunk'"); // Must identify bad option.
+    output.shouldContain("Unrecognized VM option 'SafepointSpinBeforeYieldPlusJunk'"); // Must identify bad option.
     output.shouldHaveExitValue(1);
 
     // Case 2: Newly obsolete flags should be recognized as newly obsolete (8073989)
     ProcessBuilder pb2 = ProcessTools.createJavaProcessBuilder(
-        "-XX:+ConvertSleepToYield", "-version");
+        "-XX:+SafepointSpinBeforeYield", "-version");
 
     OutputAnalyzer output2 = new OutputAnalyzer(pb2.start());
     output2.shouldContain("Ignoring option").shouldContain("support was removed");
-    output2.shouldContain("ConvertSleepToYield");
+    output2.shouldContain("SafepointSpinBeforeYield");
   }
 }