RFR JDK-8245842: provide tests for binary compatibility assertions for sealed classes

Jonathan Gibbons jonathan.gibbons at oracle.com
Wed Jun 17 17:01:51 UTC 2020


Looks good to me.

A slightly different way of handling the test cases, instead of passing 
in two complete source definitions, would be to pass in a template with 
a marker string where the sources differ, together with the values to 
substitute.  This would make it slightly easier to discern the 
similarities and differences in the source files.

Separately, as a separate RFE for toolbox tasks, we might want to add a 
'enablePreview' method to the task that cases the right underlying 
options to be set. This could be a method on AbstractTask, with possible 
overrides in the specific task classes.  This would make it easier to 
mark a task as needing preview features, and for the method call to be 
removed, eventually, when the preview feature becomes standard.

-- Jon

On 6/11/20 7:57 AM, Vicente Romero wrote:
> Hi,
>
> Please review fix for [1] at [2], this patch provides test coverage 
> for Chapter 13 Binary Compatibility of the Sealed Classes spec [3].
>
> Thanks,
> Vicente
>
> [1] https://bugs.openjdk.java.net/browse/JDK-8245842
> [2] http://cr.openjdk.java.net/~vromero/8245842/webrev.00/
> [3] 
> http://cr.openjdk.java.net/~gbierman/jep360/jep360-20200526/specs/sealed-classes-jls.html


More information about the compiler-dev mailing list