RFR(one-liner): 8191707: Options with invalid values are incorrectly treated as obsolete and ignored

Robbin Ehn robbin.ehn at oracle.com
Wed Nov 22 20:24:54 UTC 2017


Hi all, please review:

Bug: https://bugs.openjdk.java.net/browse/JDK-8191707

Test: test/hotspot/jtreg/runtime/CommandLine/ and tier 1-5 with no unexpected failure.

Contributed by David Holmes.

Looks good, thanks for fixing!

/Robbin


diff -r 2cd1c2b03782 src/hotspot/share/runtime/arguments.cpp
--- a/src/hotspot/share/runtime/arguments.cpp	Wed Nov 22 01:12:23 2017 -0800
+++ b/src/hotspot/share/runtime/arguments.cpp	Wed Nov 22 21:20:42 2017 +0100
@@ -493,15 +493,15 @@
  }

  bool Arguments::is_obsolete_flag(const char *flag_name, JDK_Version* version) {
    assert(version != NULL, "Must provide a version buffer");
    SpecialFlag flag;
    if (lookup_special_flag(flag_name, flag)) {
      if (!flag.obsolete_in.is_undefined()) {
-      if (version_less_than(JDK_Version::current(), flag.expired_in)) {
+      if (!version_less_than(JDK_Version::current(), flag.obsolete_in)) {
          *version = flag.obsolete_in;
          return true;
        }
      }
    }
    return false;
  }


More information about the hotspot-runtime-dev mailing list