RFR 8183400: runtime/6981737/Test6981737.java fails with java.lang.RuntimeException: FAIL: Wrong value for java.version property, "9", expected to be of form: "[0-9]+[\\.[0-9]+]*\-.*"
mikhailo
mikhailo.seledtsov at oracle.com
Fri Jul 7 17:11:54 UTC 2017
Updated changes look good.
Misha
On 07/07/2017 05:22 AM, harold seigel wrote:
> Hi Paul,
>
> Thanks for your suggestions. I incorporated them into the fix. Please
> review new webrev at:
>
> http://cr.openjdk.java.net/~hseigel/bug_8183400.2/webrev/index.html
>
> Thanks! Harold
>
>
> On 7/6/2017 5:48 PM, Paul Sandoz wrote:
>> Hi Harold,
>>
>> Can you directly use the instance of Runtime.Version returned from
>> Runtime.version(), since IIUC the property “java.version” is derived
>> from its state (see the generated class VersionProps). Then you don’t
>> need to perform any regex operation for spliting.
>>
>> e.g.:
>>
>> Version v = Runtime.version();
>> int major_version = v.major();
>> String vm_spec_version_re = Integer.toString(major_version);
>>
>> I bet you can simplify further and remove the check for:
>>
>> 48 if (major_version < 7) {
>>
>> since Runtime only exists on 9 upwards. So it’s redundant unless
>> there is some crazy version number overriding testing going on with
>> that test we could remove it.
>>
>> Paul.
>>
>>> On 6 Jul 2017, at 12:46, harold seigel <harold.seigel at oracle.com>
>>> wrote:
>>>
>>> Hi,
>>>
>>> Please review this JDK-10 test bug fix. The fix changes the test to
>>> call Runtime.Version.parse() to parse the "java.version" property
>>> value instead of using its own regular expression.
>>>
>>> Open Webrev: http://cr.openjdk.java.net/~hseigel/bug_8183400/webrev/
>>>
>>> JBS Bug: https://bugs.openjdk.java.net/browse/JDK-8183400
>>>
>>> The fixed test was tested on Linux using "java.version" property
>>> values of "9", "9-ea", and "10-internal".
>>>
>>> Thanks, Harold
>>>
>
More information about the hotspot-runtime-dev
mailing list