Skip to content

Commit 37465fb

Browse files
committed
8231442: Suppress warnings on non-serializable instance fields in java.sql.* modules
Reviewed-by: lancea
1 parent 2b56811 commit 37465fb

File tree

10 files changed

+18
-4
lines changed

10 files changed

+18
-4
lines changed

src/java.sql.rowset/share/classes/javax/sql/rowset/BaseRowSet.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ public abstract class BaseRowSet implements Serializable, Cloneable {
330330
* specified in the <code>ResultSet</code> interface.
331331
* @serial
332332
*/
333+
@SuppressWarnings("serial") // Not statically typed as Serializable
333334
protected java.io.InputStream binaryStream;
334335

335336
/**
@@ -338,6 +339,7 @@ public abstract class BaseRowSet implements Serializable, Cloneable {
338339
* which is specified in the <code>ResultSet</code> interface.
339340
* @serial
340341
*/
342+
@SuppressWarnings("serial") // Not statically typed as Serializable
341343
protected java.io.InputStream unicodeStream;
342344

343345
/**
@@ -346,6 +348,7 @@ public abstract class BaseRowSet implements Serializable, Cloneable {
346348
* which is specified in the <code>ResultSet</code> interface.
347349
* @serial
348350
*/
351+
@SuppressWarnings("serial") // Not statically typed as Serializable
349352
protected java.io.InputStream asciiStream;
350353

351354
/**
@@ -354,6 +357,7 @@ public abstract class BaseRowSet implements Serializable, Cloneable {
354357
* which is specified in the <code>ResultSet</code> interface.
355358
* @serial
356359
*/
360+
@SuppressWarnings("serial") // Not statically typed as Serializable
357361
protected java.io.Reader charStream;
358362

359363
/**
@@ -506,6 +510,7 @@ public abstract class BaseRowSet implements Serializable, Cloneable {
506510
* custom mapping of user-defined types.
507511
* @serial
508512
*/
513+
@SuppressWarnings("serial") // Not statically typed as Serializable
509514
private Map<String, Class<?>> map;
510515

511516
/**

src/java.sql.rowset/share/classes/javax/sql/rowset/serial/SerialArray.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ public class SerialArray implements Array, Serializable, Cloneable {
6666
* in the SQL <code>ARRAY</code> value.
6767
* @serial
6868
*/
69+
@SuppressWarnings("serial") // Not statically typed as Serializable
6970
private Object[] elements;
7071

7172
/**

src/java.sql.rowset/share/classes/javax/sql/rowset/serial/SerialBlob.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ public class SerialBlob implements Blob, Serializable, Cloneable {
7373
* The internal representation of the <code>Blob</code> object on which this
7474
* <code>SerialBlob</code> object is based.
7575
*/
76+
@SuppressWarnings("serial") // Not statically typed as Serializable; checked in writeObject
7677
private Blob blob;
7778

7879
/**

src/java.sql.rowset/share/classes/javax/sql/rowset/serial/SerialClob.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ public class SerialClob implements Clob, Serializable, Cloneable {
6868
* Internal Clob representation if SerialClob is initialized with a
6969
* Clob. Null if SerialClob is initialized with a char[].
7070
*/
71+
@SuppressWarnings("serial") // Not statically typed as Serializable; checked in writeObject
7172
private Clob clob;
7273

7374
/**

src/java.sql.rowset/share/classes/javax/sql/rowset/serial/SerialJavaObject.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ public class SerialJavaObject implements Serializable, Cloneable {
6161
/**
6262
* Placeholder for object to be serialized.
6363
*/
64+
@SuppressWarnings("serial") // Not statically typed as Serializable
6465
private Object obj;
6566

6667

src/java.sql.rowset/share/classes/javax/sql/rowset/serial/SerialRef.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,13 @@ public class SerialRef implements Ref, Serializable, Cloneable {
5656
/**
5757
* This will store the type <code>Ref</code> as an <code>Object</code>.
5858
*/
59+
@SuppressWarnings("serial") // Not statically typed as Serializable
5960
private Object object;
6061

6162
/**
6263
* Private copy of the Ref reference.
6364
*/
65+
@SuppressWarnings("serial") // Not statically typed as Serializable; checked in writeObject
6466
private Ref reference;
6567

6668
/**

src/java.sql.rowset/share/classes/javax/sql/rowset/serial/SerialStruct.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ public class SerialStruct implements Struct, Serializable, Cloneable {
8080
*
8181
* @serial
8282
*/
83+
@SuppressWarnings("serial") // Not statically typed as Serializable
8384
private Object attribs[];
8485

8586
/**

src/java.sql.rowset/share/classes/javax/sql/rowset/spi/SyncProviderException.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -70,6 +70,7 @@ public class SyncProviderException extends java.sql.SQLException {
7070
* this <code>SyncProviderException</code> object will return when its
7171
* <code>getSyncResolver</code> method is called.
7272
*/
73+
@SuppressWarnings("serial") // Not statically typed as Serializable
7374
private SyncResolver syncResolver = null;
7475

7576
/**

src/java.sql/share/classes/java/sql/SQLClientInfoException.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2006, 2019, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -49,7 +49,7 @@ public class SQLClientInfoException extends SQLException {
4949

5050

5151

52-
52+
@SuppressWarnings("serial") // Not statically typed as Serializable
5353
private Map<String, ClientInfoStatus> failedProperties;
5454

5555
/**

src/java.sql/share/classes/javax/sql/StatementEvent.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -44,6 +44,7 @@ public class StatementEvent extends EventObject {
4444

4545
static final long serialVersionUID = -8089573731826608315L;
4646
private SQLException exception;
47+
@SuppressWarnings("serial") // Not statically typed as Serializable
4748
private PreparedStatement statement;
4849

4950
/**

0 commit comments

Comments
 (0)