On Wed, 3 Nov 2021 14:13:50 GMT, Hannes Wallnöfer <hann...@openjdk.org> wrote:

>> Jonathan Gibbons has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   update to show fields of serializable records in the serializable form
>
> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/ClassBuilder.java
>  line 455:
> 
>> 453:         var fields = utils.isSerializable(elem)
>> 454:                 ? utils.getFieldsUnfiltered(elem)
>> 455:                 : utils.getFields(elem);
> 
> I guess the fields are filtered for inclusion later on, otherwise they would 
> be included in the record's class docuentation as well?

Mostly, I was just trying to minimize changes to existing code for 
non-serializable classes.

This part of the code is just about synthesizing doc comments that may be 
required later on.  If the class is not serializable, `getFields` will take 
command-line options like `-private` into account and only generate comments 
that will be required.  If the class is serializable, we want to ignore the 
default access control and always generate comments because we know they will 
be required on the Serialized Form page.

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

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

Reply via email to