< prev index next >
src/java.base/share/classes/jdk/internal/org/xml/sax/SAXException.java
Print this page
@@ -176,20 +176,22 @@
//////////////////////////////////////////////////////////////////////
// Internal state.
//////////////////////////////////////////////////////////////////////
+ @java.io.Serial
private static final ObjectStreamField[] serialPersistentFields = {
new ObjectStreamField( "exception", Exception.class )
};
/**
* Writes "exception" field to the stream.
*
* @param out stream used for serialization.
* @throws IOException thrown by <code>ObjectOutputStream</code>
*/
+ @java.io.Serial
private void writeObject(ObjectOutputStream out)
throws IOException {
ObjectOutputStream.PutField fields = out.putFields();
fields.put("exception", getExceptionInternal());
out.writeFields();
@@ -202,10 +204,11 @@
*
* @param in stream used for deserialization
* @throws IOException thrown by <code>ObjectInputStream</code>
* @throws ClassNotFoundException thrown by <code>ObjectInputStream</code>
*/
+ @java.io.Serial
private void readObject(ObjectInputStream in)
throws IOException, ClassNotFoundException {
ObjectInputStream.GetField fields = in.readFields();
Exception exception = (Exception) fields.get("exception", null);
Throwable superCause = super.getCause();
@@ -231,9 +234,10 @@
return null;
}
}
// Added serialVersionUID to preserve binary compatibility
+ @java.io.Serial
static final long serialVersionUID = 583241635256073760L;
}
// end of SAXException.java
< prev index next >