RFR: 8260517: implement Sealed Classes as a standard feature in Java [v2]

David Holmes dholmes at openjdk.java.net
Fri Apr 16 02:14:02 UTC 2021

On Fri, 16 Apr 2021 02:11:10 GMT, Vicente Romero <vromero at openjdk.org> wrote:

>> Please review this PR that intents to make sealed classes a final feature in Java. This PR contains compiler and VM changes. In line with similar PRs, which has made preview features final, this one is mostly removing preview related comments from APIs plus options in test cases. Please also review the related [CSR](https://bugs.openjdk.java.net/browse/JDK-8265090)
>> Thanks
>> note: this PR is related to [PR-3528](https://github.com/openjdk/jdk/pull/3528) and must be integrated after it.
> Vicente Romero has updated the pull request incrementally with one additional commit since the last revision:
>   removing javax.lang.model changes

Hi Vincente,

Hotspot and hotspot tests all look fine. One query: why was this test removed?


is that functionality tested elsewhere? (The other deleted test seemed obviously trivial.)


src/hotspot/share/classfile/classFileParser.cpp line 3916:

> 3914:             record_attribute_start = cfs->current();
> 3915:             record_attribute_length = attribute_length;
> 3916:           } else if (_major_version >= JAVA_17_VERSION) {

Can you update the comment at L3932 to say JAVA_17_VERSION please.

src/hotspot/share/classfile/classFileParser.hpp line 345:

> 343: 
> 344:   bool supports_sealed_types();
> 345:   bool supports_records();

Good catch!


Marked as reviewed by dholmes (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/3526

More information about the compiler-dev mailing list