RFR: JDK-8227046: compiler implementation for sealed classes, JDK-8227047: Javadoc for sealed types and JDK-8227044: javax.lang.model for sealed classes

Vicente Romero vicente.romero at oracle.com
Sat May 23 01:03:06 UTC 2020


Hi Joe,

On 5/21/20 1:21 AM, Joe Darcy wrote:
> Hi Vicente,
>
> In PrintingProcessor, I believe the printModifers method should remove 
> "SEALED" from an enum, assuming the latest policy for enums discussed 
> in the JLS is implemented (tl;dr -- all enums that cannot be 
> implicitly final are implicitly sealed).

done, have fixed this in my local copy, will send it for review with the 
next review iteration
>
> In 
> test/langtools/tools/javac/processing/model/element/TestSealed.java, 
> List<String> expected might be better constructor from a text block. 

there are some string expressions at the end, the text is not static, so 
I would have to split the text block, add the variable String to it, 
etc, probably not worthy

> Since SealedClassesProcessor extends JavacTestingAbstractProcessor, it 
> doesn't need to have be annotated with @SupportedAnnotationTypes("*") 
> or have a getSupportedSourceVersion method which returns latest since 
> that is built-into the parent class.

done
>
> Thanks,
>
> -Joe

Thanks,
Vicente

>
> On 5/18/2020 3:42 PM, Vicente Romero wrote:
>> Hi,
>>
>> Please review this patch for the compiler, javadoc and 
>> javax.lang.model support for the JEP 360 Sealed Classes (Preview). 
>> The changes are provided at [1], which implements the latest JLS for 
>> sealed types [2]. The patch also include the needed changes to 
>> javadoc and javax.lang.model to support sealed types. The CSR witht 
>> the changes in the javax.lang.model spec is at [3]. The sealed types 
>> JEP is accessible at [4]. There is an ongoing review for the VM and 
>> core-libs code of sealed types [5] and that code hasn't been included 
>> in this webrev,
>>
>> Thanks,
>> Vicente
>>
>> [1] http://cr.openjdk.java.net/~vromero/8227046/webrev.00/
>> [2] 
>> http://cr.openjdk.java.net/~gbierman/jep360/jep360-20200513/specs/sealed-classes-jls.html 
>>
>> [3] https://bugs.openjdk.java.net/browse/JDK-8244367
>> [4] https://openjdk.java.net/jeps/360
>> [5] 
>> https://mail.openjdk.java.net/pipermail/core-libs-dev/2020-May/066440.html



More information about the compiler-dev mailing list