-
Enhancement
-
Resolution: Unresolved
-
P5
-
None
-
6u5
-
Cause Known
-
x86
-
windows_vista
A DESCRIPTION OF THE PROBLEM :
I would like to propose the following clarifications to the ObjectInputValidation Javadoc:
1) The documentation should address why one would want to use the ObjectInputValidation mechanism as opposed to doing the validation at the end of the readObject() or readResolve() methods.
The documentation at http://java.sun.com/javase/6/docs/api/java/io/ObjectInputStream.html#registerValidation(java.io.ObjectInputValidation,%20int) indicates that the callback is invoked when the entire object graph has finished deserializing but it isn't clear why this would make a difference.
2) The Javadoc at http://java.sun.com/javase/6/docs/api/java/io/ObjectInputValidation.html should indicate when the callback is invoked instead of only discussing it at http://java.sun.com/javase/6/docs/api/java/io/ObjectInputStream.html#registerValidation(java.io.ObjectInputValidation,%20int)
3) The exception is documented as "InvalidObjectException - If the object cannot validate itself." but there is no guarantee that the validation object is the same object being validated. I would suggest that this read "InvalidObjectException - If the object is invalid" instead.
4) http://java.sun.com/javase/6/docs/api/java/io/InvalidObjectException.html reads "Since: JDK1.1, JDK1.1". Is this a typo?
URL OF FAULTY DOCUMENTATION :
http://java.sun.com/javase/6/docs/api/java/io/ObjectInputValidation.html
I would like to propose the following clarifications to the ObjectInputValidation Javadoc:
1) The documentation should address why one would want to use the ObjectInputValidation mechanism as opposed to doing the validation at the end of the readObject() or readResolve() methods.
The documentation at http://java.sun.com/javase/6/docs/api/java/io/ObjectInputStream.html#registerValidation(java.io.ObjectInputValidation,%20int) indicates that the callback is invoked when the entire object graph has finished deserializing but it isn't clear why this would make a difference.
2) The Javadoc at http://java.sun.com/javase/6/docs/api/java/io/ObjectInputValidation.html should indicate when the callback is invoked instead of only discussing it at http://java.sun.com/javase/6/docs/api/java/io/ObjectInputStream.html#registerValidation(java.io.ObjectInputValidation,%20int)
3) The exception is documented as "InvalidObjectException - If the object cannot validate itself." but there is no guarantee that the validation object is the same object being validated. I would suggest that this read "InvalidObjectException - If the object is invalid" instead.
4) http://java.sun.com/javase/6/docs/api/java/io/InvalidObjectException.html reads "Since: JDK1.1, JDK1.1". Is this a typo?
URL OF FAULTY DOCUMENTATION :
http://java.sun.com/javase/6/docs/api/java/io/ObjectInputValidation.html
- relates to
-
JDK-8310909 java.io.InvalidObjectException has redundant `@since` tag
-
- Resolved
-