612 * Write the instance to a stream (ie serialize the object).
613 *
614 * @exception IOException Thrown if there was an I/O error while
creating
615 * the output stream
616 */
617 private void writeObject(ObjectOutputStream s) throws IOException {
618
619 s.defaultWriteObject();
620 s.writeObject(myMimeType.getMimeType());
621 }
hmm .. seems like the output stream is your parameter so its already created.
If you look at the methods on ObjectOutputStream you'll see they say :-
* @throws IOException if I/O errors occur while writing to the underlying
* stream
I think that you just want the same text.
Same should work for readObject except its "reading from" not "writing to"
Also for this one :-
626 * @exception ClassNotFoundException Thrown if there was an error
finding
627 * the class
you need to remember that its not "the" class - as the object stream may
reference a graph of objects of varying classes and you'll get this exception
if any
class is not found. So more like this :-
* @throws ClassNotFoundException if the class of a serialized object
* could not be found.
-phil.
On 8/12/14 11:53 AM, Anisha Nagarajan wrote:
Hi,
Please review the fix for the following bug:
https://bugs.openjdk.java.net/browse/JDK-8054877
Here is the corresponding webrev:
http://cr.openjdk.java.net/~ssides/8054877/8054877.0
<http://cr.openjdk.java.net/%7Essides/8054877/8054877.0>
This fix addresses the missing @exception tags for IOExceptions and
ClassNotFoundExceptions in DocFlavor.java.
Thank you,
Anisha Nagarajan