RFR(one-liner): 8191707: Options with invalid values are incorrectly treated as obsolete and ignored
Daniel D. Daugherty
daniel.daugherty at oracle.com
Thu Nov 23 00:19:46 UTC 2017
On 11/22/17 3:24 PM, Robbin Ehn wrote:
> 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!
Thumbs up on the fix.
What I don't understand is why this logic did not fall over before now.
Dan
>
> /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