JDK 11 RFR of 8202334: Update javax.lang.model.util visitors for 11

Joseph D. Darcy joe.darcy at oracle.com
Tue May 1 20:31:01 UTC 2018


Hi Jon,

On 5/1/2018 1:15 PM, Jonathan Gibbons wrote:
>
> OK, for the non-white content :-) but a minor nit regarding 
> whitespace.  Many of the affected comments are inconsistent with the 
> use of <p> after a blank line in the comment. Is this intentional?
>

It is intentional. I often prefer to have each sentence appear with 
whitespace around it in the javadoc sources to make future edits have 
less "by catch" of spurious updates to surrounding text.

Thanks,

-Joe

> See this file, as an example:
>
> http://cr.openjdk.java.net/~darcy/8202334.0/src/java.compiler/share/classes/javax/lang/model/util/TypeKindVisitor9.java.sdiff.html
>
> and this extract:
>
>    34  * A visitor of types based on their {@linkplain TypeKind kind} with
>    35  * default behavior appropriate for source versions {@link
>    36  * SourceVersion#RELEASE_9 RELEASE_9} through {@link
>    37  * SourceVersion#RELEASE_11 RELEASE_11}.
>    38  *
>    39  * For {@linkplain
>    40  * TypeMirror types} <code><i>Xyz</i></code> that may have more than one
>    41  * kind, the <code>visit<i>Xyz</i></code> methods in this class delegate
>    42  * to the <code>visit<i>Xyz</i>As<i>Kind</i></code> method corresponding to the
>    43  * first argument's kind.  The <code>visit<i>Xyz</i>As<i>Kind</i></code> methods
>    44  * call {@link #defaultAction defaultAction}, passing their arguments
>    45  * to {@code defaultAction}'s corresponding parameters.
>    46  *
>    47  * <p> Methods in this class may be overridden subject to their
>    48  * general contract.  Note that annotating methods in concrete
>    49  * subclasses with {@link java.lang.Override @Override} will help
>    50  * ensure that methods are overridden as intended.
> Note that lines 38 and 46 are blank, but 39 does not use <p> but 47 does.
>
> -- Jon
>
>
>
> On 4/26/18 10:50 AM, joe darcy wrote:
>> Hello,
>>
>> Please review the webrev and CSR for 8202334: "Update 
>> javax.lang.model.util visitors for 11":
>>
>> http://cr.openjdk.java.net/~darcy/8202334.0/
>> https://bugs.openjdk.java.net/browse/JDK-8202335
>>
>> From the CSR:
>>
>>> The `javax.lang.model` API was added in Java SE 6. In each of Java 
>>> SE 7, 8, and 9, new sets of utility visitors were added for each 
>>> release, for example starting with `AbstractElementVisitor6`, types 
>>> `AbstractElementVisitor7`, `AbstractElementVisitor8`, 
>>> `AbstractElementVisitor8` were added in SE 7 and 8, respectively. 
>>> Similar patterns were followed for `ElementKindVisitor6`, and the 
>>> rest of the utility visitors.
>>>
>>> In Java SE 10, there were no language changes requiring new 
>>> operational behavior from the root visitors. Therefore, rather than 
>>> introducing yet another slate of visitor classes, the 9-era visitors 
>>> were updated to indicate they are appropriate for 10 as well 
>>> (CCC-8193194).
>>>
>>> In the absence of language changes in 11 which would require new 
>>> operational behavior from the visitors, the 9-era visitors should be 
>>> updated to indicate they are appropriate for releases 9 through 11.
>>>
>>> Solution
>>> --------
>>> Update the specification and `SupportedSourceVersion` annotations on 
>>> the 9-era visitor classes to indicate they are appropriate for 
>>> release 11.
>>
>> Thanks,
>>
>> -Joe
>>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20180501/9014ceb2/attachment-0001.html>


More information about the compiler-dev mailing list