On Fri, 26 May 2023 02:06:55 GMT, Joe Darcy <da...@openjdk.org> wrote:

> Explain in java.lang.Class how unnamed classes are modeled in core reflection.

> > Looks fine. This version matches the current implementation where 
> > `getCanonicalName` returns non-null. When the implementation of 
> > `getCanonicalName` is updated to return null, the spec should be updated.
> > Nit: `<p>` is needed assuming the section of "Unnamed Classes" has 3 
> > paragraphs.
> 
> Thanks @mlchung.
> 
> Yes, the current spec matches what the implementation in @JimLaskey 's PR 
> #13689 does at the time of writing.
> 
> Discussions are on-going with the JEP 445 team regarding whether and how to 
> implement a "isUnnamedClass" predicate for core reflection which would allow 
> the `getCanonicalName` method to screen for unnamed classes and return null, 
> as would reasonably be implied by a reading of the most current draft JLS 
> updates.

PS Depending on the result of those discussion, the specification for 
`getCanonicalName` may be changed to return `null`.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/14165#issuecomment-1564920419

Reply via email to