[rfc] make test ignored or valid only for specific JDK
Jiri Vanek
jvanek at redhat.com
Thu Apr 2 09:19:49 UTC 2015
On 04/01/2015 08:32 PM, Jonathan Gibbons wrote:
>
> On 04/01/2015 10:34 AM, Jiri Vanek wrote:
>>>
>>> * @requires jdk.version <= 7
>>> leads to
>>> test result: Error. Error evaluating expression: invalid numeric value: 1.8
>>>
>>> Is it expected bahviour? I tried also with various spaces/nospace....
>>>
>>>
>> ping? Is it expected? If not, I will provide you a fix.
>>
>> J.
>
> With hindsight, I can see that this is to be expected, which is not to say that it is good.
>
> Going forward, I'm not sure what the correct fix will be, especially given the upcoming JEP for
> semantic versioning.
> http://openjdk.java.net/jeps/223
Yes, I'm aware of this jep.
>
> Before you provide a fix, I'd be interested to hear suggestions on what the fix should be. One
> solution is that we should just allow numbers to be represented as Double as well as Long. A
> different solution would be to introduce a "version" type somehow.
When I saw the behavior, And realized that jep 233 was target, I was thinking that
>>> * @requires jdk.version <= 7
>>> leads to
>>> test result: Error. Error evaluating expression: invalid numeric value: 1.8
Is correct way to do. And so, if this Error is hit, try to remove leading 1. and strip all behind
next dot including that dot.
For jdk9+ single number is expected.
Otherwise the qeustion is a bit different. What is expected from "jdk.version" Only mayor number
like 1.4.2, 1.7.0, 1.8.0, 9, 10, or more detailed version?
I would vote for that simple approach, but probably only because it suits my needs now.
Cases like 1.4.2 in past 1.4.0 may be expected... But still, non of those should causes compilation
incompatibility.
Thank you very much for cooperation!
J.
More information about the jtreg-dev
mailing list