RFR: JDK-8250768: javac should be adapted to changes in JEP 12 [v4]

Jan Lahoda jlahoda at openjdk.java.net
Thu Oct 29 09:28:51 UTC 2020


On Fri, 23 Oct 2020 18:28:12 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:

>> Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Removing unnecessary cast.
>
> src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ElementsTable.java line 1288:
> 
>> 1286:                 case FIELD: case INSTANCE_INIT: case LOCAL_VARIABLE: case PARAMETER:
>> 1287:                 case RESOURCE_VARIABLE: case STATIC_INIT: case TYPE_PARAMETER:
>> 1288:                 case RECORD_COMPONENT:
> 
> I'm not saying this is wrong, but I'd like to understand why it is necessary.

HtmlDocletWriter.getPreviewNotes analyzes classes and their members, to see if some are using aspects that are under preview. When looking at the members, it uses utils.isIncluded on the member, and that eventually gets here. And if the member is a RECORD_COMPONENT, it would fail here. But we can avoid asking for RECORD_COMPONENTS, if needed.

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

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



More information about the build-dev mailing list