8231442: Suppress warnings on non-serializable instance fields in java.sql.* modules
Reviewed-by: lancea
--- a/src/java.sql.rowset/share/classes/javax/sql/rowset/BaseRowSet.java Wed Sep 25 08:29:03 2019 -0700
+++ b/src/java.sql.rowset/share/classes/javax/sql/rowset/BaseRowSet.java Wed Sep 25 09:37:18 2019 -0700
@@ -330,6 +330,7 @@
* specified in the <code>ResultSet</code> interface.
* @serial
*/
+ @SuppressWarnings("serial") // Not statically typed as Serializable
protected java.io.InputStream binaryStream;
/**
@@ -338,6 +339,7 @@
* 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 @@
* 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 @@
* 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 @@
* custom mapping of user-defined types.
* @serial
*/
+ @SuppressWarnings("serial") // Not statically typed as Serializable
private Map<String, Class<?>> map;
/**
--- a/src/java.sql.rowset/share/classes/javax/sql/rowset/serial/SerialArray.java Wed Sep 25 08:29:03 2019 -0700
+++ b/src/java.sql.rowset/share/classes/javax/sql/rowset/serial/SerialArray.java Wed Sep 25 09:37:18 2019 -0700
@@ -66,6 +66,7 @@
* in the SQL <code>ARRAY</code> value.
* @serial
*/
+ @SuppressWarnings("serial") // Not statically typed as Serializable
private Object[] elements;
/**
--- a/src/java.sql.rowset/share/classes/javax/sql/rowset/serial/SerialBlob.java Wed Sep 25 08:29:03 2019 -0700
+++ b/src/java.sql.rowset/share/classes/javax/sql/rowset/serial/SerialBlob.java Wed Sep 25 09:37:18 2019 -0700
@@ -73,6 +73,7 @@
* 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;
/**
--- a/src/java.sql.rowset/share/classes/javax/sql/rowset/serial/SerialClob.java Wed Sep 25 08:29:03 2019 -0700
+++ b/src/java.sql.rowset/share/classes/javax/sql/rowset/serial/SerialClob.java Wed Sep 25 09:37:18 2019 -0700
@@ -68,6 +68,7 @@
* 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;
/**
--- a/src/java.sql.rowset/share/classes/javax/sql/rowset/serial/SerialJavaObject.java Wed Sep 25 08:29:03 2019 -0700
+++ b/src/java.sql.rowset/share/classes/javax/sql/rowset/serial/SerialJavaObject.java Wed Sep 25 09:37:18 2019 -0700
@@ -61,6 +61,7 @@
/**
* Placeholder for object to be serialized.
*/
+ @SuppressWarnings("serial") // Not statically typed as Serializable
private Object obj;
--- a/src/java.sql.rowset/share/classes/javax/sql/rowset/serial/SerialRef.java Wed Sep 25 08:29:03 2019 -0700
+++ b/src/java.sql.rowset/share/classes/javax/sql/rowset/serial/SerialRef.java Wed Sep 25 09:37:18 2019 -0700
@@ -56,11 +56,13 @@
/**
* 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;
/**
--- a/src/java.sql.rowset/share/classes/javax/sql/rowset/serial/SerialStruct.java Wed Sep 25 08:29:03 2019 -0700
+++ b/src/java.sql.rowset/share/classes/javax/sql/rowset/serial/SerialStruct.java Wed Sep 25 09:37:18 2019 -0700
@@ -80,6 +80,7 @@
*
* @serial
*/
+ @SuppressWarnings("serial") // Not statically typed as Serializable
private Object attribs[];
/**
--- a/src/java.sql.rowset/share/classes/javax/sql/rowset/spi/SyncProviderException.java Wed Sep 25 08:29:03 2019 -0700
+++ b/src/java.sql.rowset/share/classes/javax/sql/rowset/spi/SyncProviderException.java Wed Sep 25 09:37:18 2019 -0700
@@ -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 @@
* 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;
/**
--- a/src/java.sql/share/classes/java/sql/SQLClientInfoException.java Wed Sep 25 08:29:03 2019 -0700
+++ b/src/java.sql/share/classes/java/sql/SQLClientInfoException.java Wed Sep 25 09:37:18 2019 -0700
@@ -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 @@
-
+ @SuppressWarnings("serial") // Not statically typed as Serializable
private Map<String, ClientInfoStatus> failedProperties;
/**
--- a/src/java.sql/share/classes/javax/sql/StatementEvent.java Wed Sep 25 08:29:03 2019 -0700
+++ b/src/java.sql/share/classes/javax/sql/StatementEvent.java Wed Sep 25 09:37:18 2019 -0700
@@ -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 @@
static final long serialVersionUID = -8089573731826608315L;
private SQLException exception;
+ @SuppressWarnings("serial") // Not statically typed as Serializable
private PreparedStatement statement;
/**