RFR 8246337: Add more JVM tests for sealed classes

Harold Seigel harold.seigel at oracle.com
Thu Jun 25 12:18:35 UTC 2020


Thanks David!

I'll change the new test to "@bug 8225056 8246337" before pushing the 
change.

Harold

On 6/25/2020 1:50 AM, David Holmes wrote:
> Hi Harold,
>
> On 22/06/2020 11:06 pm, Harold Seigel wrote:
>> Hi,
>>
>> Please review this change to add more JVM tests for sealed classes. 
>> With this change there are now the following set of tests for both 
>> sealed classes and sealed interfaces.
>>
>> 1. Successful tests when both the subclass and its sealed super type
>>     are in the same module and package and subclass is listed on its
>>     sealed type's permits list.
>> 2. Successful tests when both the subclass and its sealed super type
>>     are in the same module, different package, and the subclass is open
>>     and is listed on its sealed type's permits list.
>> 3. Error tests for when the subclass and its sealed super type are in
>>     different modules and the subclass is listed on its sealed type's
>>     permits list.
>> 4. Error tests for when the subclass and its sealed super type are in
>>     the same module, but different packages, and the subclass is not
>>     open and the subclass is listed on its sealed type's permit list.
>> 5. Error tests for when the subclass and its sealed super type are in
>>     the same module and package but the subclass is not listed on its
>>     sealed type's permits list.
>
> Thanks for expanding the test coverage here!
>
>> Open Webrev: 
>> http://cr.openjdk.java.net/~hseigel/bug_8246337/webrev/index.html
>
> Looks good. One minor nit, in the new test it has
>
> @bug 8225056
>
> which should be
>
> @bug 8246337
>
> or even
>
> @bug 8225056 8246337
>
> Thanks,
> David
> -----
>
>> JBS Bug: https://bugs.openjdk.java.net/browse/JDK-8246337
>>
>> The new and modified tests were tested on Linux-x64, Linux-aarch64, 
>> Windows, and Mac OS X using Mach5.
>>
>> Thanks, Harold
>>
>>


More information about the hotspot-runtime-dev mailing list