Hi Sean,
On 8/29/2019 6:18 AM, Sean Mullan wrote:
Looks fine to me although I didn't check if you missed anything.
What kind of documentation changes can we expect by using this
annotation?
The documentation changes are just when reading the sources, the
annotation type itself is not @Documented so it doesn't appear in the
generated javadoc.
Thanks,
-Joe
--Sean
On 8/27/19 8:16 PM, Joe Darcy wrote:
Hello,
Recent work for JDK-8202385: "Annotation to mark serial-related
fields and methods" added the java.io.Serial annotation type to the
platform. The intention of this new annotation type is to allow
serialization-related fields and methods to be marked as
documentation and to allow stricter compile-time checking, analogous
to the checking done for @Override. Implementing those stricter
serialization-related checks will be done under JDK-8202056.
Please review the application of java.io.Serial to the
security-related types in the base module:
JDK-8229999 : Apply java.io.Serial annotations to security types
in java.base
http://cr.openjdk.java.net/~darcy/8229999.0/
As a reminder, the 5 serialization-related methods and 2 fields are:
* private void writeObject(java.io.ObjectOutputStream stream)
throws IOException
* private void readObject(java.io.ObjectInputStream stream)
throws IOException, ClassNotFoundException
* private void readObjectNoData() throws ObjectStreamException
* ANY-ACCESS-MODIFIER Object writeReplace() throws
ObjectStreamException
* ANY-ACCESS-MODIFIER Object readResolve() throws
ObjectStreamException
* private static final ObjectStreamField[] serialPersistentFields
* private static final long serialVersionUID
Thanks,
-Joe