8208060: Additional corrections of serial-related declarations

Reviewed-by: rriggs, lancea
This commit is contained in:
Joe Darcy 2018-07-20 14:46:43 -07:00
parent 9959e34180
commit 07cb147927
9 changed files with 8 additions and 11 deletions

View file

@ -1709,8 +1709,7 @@ class InetAddress implements java.io.Serializable {
return (InetAddressImpl) impl;
}
private void readObjectNoData () throws
IOException, ClassNotFoundException {
private void readObjectNoData () {
if (getClass().getClassLoader() != null) {
throw new SecurityException ("invalid address type");
}

View file

@ -68,6 +68,4 @@ public enum MemoryType {
public String toString() {
return description;
}
private static final long serialVersionUID = 6992337162326171013L;
}

View file

@ -225,7 +225,7 @@ public class ActivationID implements Serializable {
* specification.
**/
private void writeObject(ObjectOutputStream out)
throws IOException, ClassNotFoundException
throws IOException
{
out.writeObject(uid);

View file

@ -359,7 +359,7 @@ public abstract class RemoteObject implements Remote, java.io.Serializable {
* <code>readExternal</code> method.
*/
private void writeObject(java.io.ObjectOutputStream out)
throws java.io.IOException, java.lang.ClassNotFoundException
throws java.io.IOException
{
if (ref == null) {
throw new java.rmi.MarshalException("Invalid remote object");

View file

@ -629,7 +629,7 @@ public class SerialArray implements Array, Serializable, Cloneable {
* to a stream.
*/
private void writeObject(ObjectOutputStream s)
throws IOException, ClassNotFoundException {
throws IOException {
ObjectOutputStream.PutField fields = s.putFields();
fields.put("elements", elements);

View file

@ -570,7 +570,7 @@ public class SerialBlob implements Blob, Serializable, Cloneable {
* to a stream.
*/
private void writeObject(ObjectOutputStream s)
throws IOException, ClassNotFoundException {
throws IOException {
ObjectOutputStream.PutField fields = s.putFields();
fields.put("buf", buf);

View file

@ -237,7 +237,7 @@ public class SerialRef implements Ref, Serializable, Cloneable {
* to a stream.
*/
private void writeObject(ObjectOutputStream s)
throws IOException, ClassNotFoundException {
throws IOException {
ObjectOutputStream.PutField fields = s.putFields();
fields.put("baseTypeName", baseTypeName);

View file

@ -332,7 +332,7 @@ public class SerialStruct implements Struct, Serializable, Cloneable {
* to a stream.
*/
private void writeObject(ObjectOutputStream s)
throws IOException, ClassNotFoundException {
throws IOException {
ObjectOutputStream.PutField fields = s.putFields();
fields.put("attribs", attribs);

View file

@ -553,7 +553,7 @@ public class BatchUpdateException extends SQLException {
* to a stream.
*/
private void writeObject(ObjectOutputStream s)
throws IOException, ClassNotFoundException {
throws IOException {
ObjectOutputStream.PutField fields = s.putFields();
fields.put("updateCounts", updateCounts);