JDK 9 RFR of JDK-6415644 Make javax.lang.model.SourceVersion more informative
Joseph D. Darcy
joe.darcy at oracle.com
Tue May 17 22:04:49 UTC 2016
PS And know remembering to include the new link!
http://cr.openjdk.java.net/~darcy/6415644.1/
-Joe
On 5/17/2016 3:03 PM, Joseph D. Darcy wrote:
> Hi Jon,
>
> On 5/17/2016 2:10 PM, Jonathan Gibbons wrote:
>> That being said, the implementation does not appear to give what
>> might be considered correct answers to
>> isKeyword("assert", SourceVersion.RELEASE0);
>> isKeyword("enum", SourceVersion.RELEASE0);
>>
>> I can't help feeling that the body of isKeyword is likely to evolve
>> into a strings-in-switch ;-)
>
> As you wish, including version-sensitive results and tests for
> "strictfp", "assert", "enum", etc.
>
> Thanks,
>
> -Joe
>
>
>>
>> -- Jon
>>
>> On 05/17/2016 01:11 PM, Jonathan Gibbons wrote:
>>> Looks OK to me.
>>>
>>> You could micro-optimize these lines
>>>
>>> 318 String id = s.toString();
>>> 319 if ("_".equals(id)) {
>>>
>>> to use .contentEquals and aboid a possibly unnecessary .toString().
>>>
>>> -- Jon
>>>
>>>
>>>
>>> On 05/17/2016 11:48 AM, joe darcy wrote:
>>>> Hello,
>>>>
>>>> Please review this webrev to add some version-sensitive keyword and
>>>> name queries:
>>>>
>>>> JDK-6415644 Make javax.lang.model.SourceVersion more informative
>>>>
>>>> http://cr.openjdk.java.net/~darcy/6415644.0/
>>>>
>>>> Thanks,
>>>>
>>>> -Joe
>>>>
>>>
>>
>
More information about the compiler-dev
mailing list