On Wed, 13 Oct 2021 21:08:41 GMT, Joe Darcy <da...@openjdk.org> wrote:
> After a refinement to the checks under development in #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." > > The jdk.jlink module has one instance of this coding pattern that needs > suppression to compile successfully under the future warning. This pull request has now been integrated. Changeset: f1781851 Author: Joe Darcy <da...@openjdk.org> URL: https://git.openjdk.java.net/jdk/commit/f17818516cf80e6e208309200c98b23919c3cddb Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod 8275249: Suppress warnings on non-serializable array component types in jdk.jlink Reviewed-by: iris ------------- PR: https://git.openjdk.java.net/jdk/pull/5936