On Fri, 22 Oct 2021 00:12:04 GMT, Jonathan Gibbons <j...@openjdk.org> wrote:

> Please review a trivial fix and simple test for DocLint and serializable 
> records.
> 
> Although the original JBS issue was somewhat confused, the underlying cause 
> of the test case is that `javadoc`/`DocLint` was checking the comments on the 
> private internal fields, prior to writing the fields in the "Serialized Form" 
> page.  Since the serialized form is defined to be exactly the record 
> components, there is no need to document the fields, as explained in section 
> 1.13, Serialization of Records. 
> https://docs.oracle.com/en/java/javase/17/docs/specs/serialization/serial-arch.html#serialization-of-records
> 
>> Documenting serializable fields and data for record classes is unnecessary, 
>> since there is no variation in the serial form, other than whether a 
>> substitute or replacement object is used.
> 
> ## Update
> 
> Based on feedback, the proposed implementation is changed to always generate 
> entries for the private fields in the serialized form for serializable 
> records.   This just requires that we now always generate the comments for 
> the private fields for serializable records. If the comments are generated, 
> they will be picked up automatically by `SerializedFormBuilder`

This pull request has now been integrated.

Changeset: e383d263
Author:    Jonathan Gibbons <j...@openjdk.org>
URL:       
https://git.openjdk.java.net/jdk/commit/e383d263610c7b4d4be2dce599a9043b8f76cd64
Stats:     107 lines in 3 files changed: 59 ins; 26 del; 22 mod

8275199: Bogus warning generated for serializable records

Reviewed-by: hannesw

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

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

Reply via email to