Integrated: JDK-8275186: Suppress warnings on non-serializable array component types in xml
Joe Darcy
darcy at openjdk.java.net
Wed Oct 13 05:30:25 UTC 2021
On Wed, 13 Oct 2021 04:49:22 GMT, Joe Darcy <darcy at openjdk.org> wrote:
> After a refinement to the checks under development in https://github.com/openjdk/jdk/pull/5709, the new checks examine array types of serial fields and warn if the underlying component type is not serializable. Per the JLS, all array types are serializable, but if the base component is not serializable, the serialization process can throw an exception.
>
> From "Java Object Serialization Specification: 2 - Object Output Classes":
>
> "If the object is an array, writeObject is called recursively to write the ObjectStreamClass of the array. The handle for the array is assigned. It is followed by the length of the array. Each element of the array is then written to the stream, after which writeObject returns."
This pull request has now been integrated.
Changeset: ab34cced
Author: Joe Darcy <darcy at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/ab34cced3beae765fe9d6b6acfef7e6a7f3082cd
Stats: 11 lines in 6 files changed: 6 ins; 0 del; 5 mod
8275186: Suppress warnings on non-serializable array component types in xml
Reviewed-by: joehw
-------------
PR: https://git.openjdk.java.net/jdk/pull/5924
More information about the core-libs-dev
mailing list