JDK 14 RFR of JDK-8232076: Suppress warnings on non-serializable non-transient instance fields java.naming
Joe Darcy
joe.darcy at oracle.com
Wed Oct 9 22:37:53 UTC 2019
Hello,
The serialization review continues, this time a few fields in the
java.naming module:
http://cr.openjdk.java.net/~darcy/8232076.0/
Patch below; thanks,
-Joe
---
old/src/java.naming/share/classes/com/sun/jndi/toolkit/ctx/Continuation.java
2019-10-09 15:32:45.258000000 -0700
+++
new/src/java.naming/share/classes/com/sun/jndi/toolkit/ctx/Continuation.java
2019-10-09 15:32:45.062000000 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights
reserved.
+ * Copyright (c) 1999, 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
@@ -51,6 +51,7 @@
/**
* Whether links were encountered.
*/
+ @SuppressWarnings("serial") // Not statically typed as Serializable
protected Object followingLink = null;
/**
@@ -71,6 +72,7 @@
* The last resolved context. Used to set the "AltNameCtx" in a
* CannotProceedException.
*/
+ @SuppressWarnings("serial") // Not statically typed as Serializable
protected Context resolvedContext = null;
/**
--- old/src/java.naming/share/classes/javax/naming/Binding.java
2019-10-09 15:32:45.750000000 -0700
+++ new/src/java.naming/share/classes/javax/naming/Binding.java
2019-10-09 15:32:45.566000000 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights
reserved.
+ * Copyright (c) 1999, 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
@@ -54,6 +54,7 @@
* @see #getObject
* @see #setObject
*/
+ @SuppressWarnings("serial") // Not statically typed as Serializable
private Object boundObj;
/**
---
old/src/java.naming/share/classes/javax/naming/CannotProceedException.java
2019-10-09 15:32:46.218000000 -0700
+++
new/src/java.naming/share/classes/javax/naming/CannotProceedException.java
2019-10-09 15:32:46.022000000 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights
reserved.
+ * Copyright (c) 1999, 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
@@ -127,6 +127,7 @@
* @see #altName
* @see javax.naming.spi.ObjectFactory#getObjectInstance
*/
+ @SuppressWarnings("serial") // Not statically typed as Serializable
protected Context altNameCtx = null;
/**
--- old/src/java.naming/share/classes/javax/naming/LinkException.java
2019-10-09 15:32:46.706000000 -0700
+++ new/src/java.naming/share/classes/javax/naming/LinkException.java
2019-10-09 15:32:46.502000000 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights
reserved.
+ * Copyright (c) 1999, 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
@@ -85,6 +85,7 @@
* @see #getLinkResolvedObj
* @see #setLinkResolvedObj
*/
+ @SuppressWarnings("serial") // Not statically typed as Serializable
protected Object linkResolvedObj;
/**
--- old/src/java.naming/share/classes/javax/naming/NamingException.java
2019-10-09 15:32:47.210000000 -0700
+++ new/src/java.naming/share/classes/javax/naming/NamingException.java
2019-10-09 15:32:47.002000000 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights
reserved.
+ * Copyright (c) 1999, 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
@@ -79,6 +79,7 @@
* @see #getResolvedObj
* @see #setResolvedObj
*/
+ @SuppressWarnings("serial") // Not statically typed as Serializable
protected Object resolvedObj;
/**
* Contains the remaining name that has not been resolved yet.
---
old/src/java.naming/share/classes/javax/naming/event/NamingEvent.java
2019-10-09 15:32:47.710000000 -0700
+++
new/src/java.naming/share/classes/javax/naming/event/NamingEvent.java
2019-10-09 15:32:47.522000000 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2000, Oracle and/or its affiliates. All rights
reserved.
+ * Copyright (c) 1999, 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
@@ -122,6 +122,7 @@
* Contains information about the change that generated this event.
* @serial
*/
+ @SuppressWarnings("serial") // Not statically typed as Serializable
protected Object changeInfo;
/**
---
old/src/java.naming/share/classes/javax/naming/spi/ResolveResult.java
2019-10-09 15:32:48.218000000 -0700
+++
new/src/java.naming/share/classes/javax/naming/spi/ResolveResult.java
2019-10-09 15:32:48.010000000 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights
reserved.
+ * Copyright (c) 1999, 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
@@ -50,6 +50,7 @@
* Constructors should always initialize this.
* @serial
*/
+ @SuppressWarnings("serial") // Not statically typed as Serializable
protected Object resolvedObj;
/**
* Field containing the remaining name yet to be resolved.
More information about the core-libs-dev
mailing list