Hi Vincente,
On 16/11/2020 11:36 pm, Vicente Romero wrote:
Please review the code for the second iteration of sealed classes. In this
iteration we are:
- Enhancing narrowing reference conversion to allow for stricter checking of
cast conversions with respect to sealed type hierarchies.
- Also local classes are not considered when determining implicitly declared
permitted direct subclasses of a sealed class or sealed interface
The major change here seems to be that getPermittedSubclasses() now
returns actual Class objects instead of ClassDesc. My recollection from
earlier discussions here was that the use of ClassDesc was very
deliberate as the permitted subclasses may not actually exist and there
may be security concerns with returning them!
Cheers,
David
-----
-------------
Commit messages:
- 8246778: Compiler implementation for Sealed Classes (Second Preview)
Changes: https://git.openjdk.java.net/jdk/pull/1227/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1227&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8246778
Stats: 589 lines in 12 files changed: 508 ins; 18 del; 63 mod
Patch: https://git.openjdk.java.net/jdk/pull/1227.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/1227/head:pull/1227
PR: https://git.openjdk.java.net/jdk/pull/1227