8231442: Suppress warnings on non-serializable instance fields in java.sql.* modules

Reviewed-by: lancea
This commit is contained in:
Joe Darcy 2019-09-25 09:37:18 -07:00
parent 2b56811616
commit 37465fba75
10 changed files with 18 additions and 4 deletions

View File

@ -330,6 +330,7 @@ public abstract class BaseRowSet implements Serializable, Cloneable {
* specified in the <code>ResultSet</code> interface.
* @serial
*/
@SuppressWarnings("serial") // Not statically typed as Serializable
protected java.io.InputStream binaryStream;
/**
@ -338,6 +339,7 @@ public abstract class BaseRowSet implements Serializable, Cloneable {
* which is specified in the <code>ResultSet</code> interface.
* @serial
*/
@SuppressWarnings("serial") // Not statically typed as Serializable
protected java.io.InputStream unicodeStream;
/**
@ -346,6 +348,7 @@ public abstract class BaseRowSet implements Serializable, Cloneable {
* which is specified in the <code>ResultSet</code> interface.
* @serial
*/
@SuppressWarnings("serial") // Not statically typed as Serializable
protected java.io.InputStream asciiStream;
/**
@ -354,6 +357,7 @@ public abstract class BaseRowSet implements Serializable, Cloneable {
* which is specified in the <code>ResultSet</code> interface.
* @serial
*/
@SuppressWarnings("serial") // Not statically typed as Serializable
protected java.io.Reader charStream;
/**
@ -506,6 +510,7 @@ public abstract class BaseRowSet implements Serializable, Cloneable {
* custom mapping of user-defined types.
* @serial
*/
@SuppressWarnings("serial") // Not statically typed as Serializable
private Map<String, Class<?>> map;
/**

View File

@ -66,6 +66,7 @@ public class SerialArray implements Array, Serializable, Cloneable {
* in the SQL <code>ARRAY</code> value.
* @serial
*/
@SuppressWarnings("serial") // Not statically typed as Serializable
private Object[] elements;
/**

View File

@ -73,6 +73,7 @@ public class SerialBlob implements Blob, Serializable, Cloneable {
* The internal representation of the <code>Blob</code> object on which this
* <code>SerialBlob</code> object is based.
*/
@SuppressWarnings("serial") // Not statically typed as Serializable; checked in writeObject
private Blob blob;
/**

View File

@ -68,6 +68,7 @@ public class SerialClob implements Clob, Serializable, Cloneable {
* Internal Clob representation if SerialClob is initialized with a
* Clob. Null if SerialClob is initialized with a char[].
*/
@SuppressWarnings("serial") // Not statically typed as Serializable; checked in writeObject
private Clob clob;
/**

View File

@ -61,6 +61,7 @@ public class SerialJavaObject implements Serializable, Cloneable {
/**
* Placeholder for object to be serialized.
*/
@SuppressWarnings("serial") // Not statically typed as Serializable
private Object obj;

View File

@ -56,11 +56,13 @@ public class SerialRef implements Ref, Serializable, Cloneable {
/**
* This will store the type <code>Ref</code> as an <code>Object</code>.
*/
@SuppressWarnings("serial") // Not statically typed as Serializable
private Object object;
/**
* Private copy of the Ref reference.
*/
@SuppressWarnings("serial") // Not statically typed as Serializable; checked in writeObject
private Ref reference;
/**

View File

@ -80,6 +80,7 @@ public class SerialStruct implements Struct, Serializable, Cloneable {
*
* @serial
*/
@SuppressWarnings("serial") // Not statically typed as Serializable
private Object attribs[];
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -70,6 +70,7 @@ public class SyncProviderException extends java.sql.SQLException {
* this <code>SyncProviderException</code> object will return when its
* <code>getSyncResolver</code> method is called.
*/
@SuppressWarnings("serial") // Not statically typed as Serializable
private SyncResolver syncResolver = null;
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2006, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -49,7 +49,7 @@ public class SQLClientInfoException extends SQLException {
@SuppressWarnings("serial") // Not statically typed as Serializable
private Map<String, ClientInfoStatus> failedProperties;
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -44,6 +44,7 @@ public class StatementEvent extends EventObject {
static final long serialVersionUID = -8089573731826608315L;
private SQLException exception;
@SuppressWarnings("serial") // Not statically typed as Serializable
private PreparedStatement statement;
/**