diff --git a/src/java.rmi/share/classes/java/rmi/activation/ActivationGroupDesc.java b/src/java.rmi/share/classes/java/rmi/activation/ActivationGroupDesc.java index f46ade7c5f6..4a40f6054df 100644 --- a/src/java.rmi/share/classes/java/rmi/activation/ActivationGroupDesc.java +++ b/src/java.rmi/share/classes/java/rmi/activation/ActivationGroupDesc.java @@ -90,6 +90,7 @@ public final class ActivationGroupDesc implements Serializable { private Properties props; /** indicate compatibility with the Java 2 SDK v1.2 version of class */ + @java.io.Serial private static final long serialVersionUID = -4936225423168276595L; /** @@ -204,6 +205,7 @@ public final class ActivationGroupDesc implements Serializable { * @since 1.2 */ public static class CommandEnvironment implements Serializable { + @java.io.Serial private static final long serialVersionUID = 6165754737887770191L; /** @@ -308,12 +310,17 @@ public final class ActivationGroupDesc implements Serializable { * *
This method reads this object's serialized form for this * class as follows: - * *
This method first invokes defaultReadObject
on
* the specified object input stream, and if options
* is null
, then options
is set to a
* zero-length array of String
.
+ *
+ * @param in the {@code ObjectInputStream} from which data is read
+ * @throws IOException if an I/O error occurs
+ * @throws ClassNotFoundException if a serialized class cannot be loaded
+ *
*/
+ @java.io.Serial
private void readObject(ObjectInputStream in)
throws IOException, ClassNotFoundException
{
diff --git a/src/java.rmi/share/classes/java/rmi/activation/ActivationID.java b/src/java.rmi/share/classes/java/rmi/activation/ActivationID.java
index 5770b69aec8..994d76f55fb 100644
--- a/src/java.rmi/share/classes/java/rmi/activation/ActivationID.java
+++ b/src/java.rmi/share/classes/java/rmi/activation/ActivationID.java
@@ -90,6 +90,7 @@ public class ActivationID implements Serializable {
private transient UID uid = new UID();
/** indicate compatibility with the Java 2 SDK v1.2 version of class */
+ @java.io.Serial
private static final long serialVersionUID = -4608673054848209235L;
/** an AccessControlContext with no permissions */
@@ -228,7 +229,11 @@ public class ActivationID implements Serializable {
* java.rmi.server.RemoteObject RemoteObject}
* writeObject
method serialData
* specification.
+ *
+ * @param out the {@code ObjectOutputStream} to which data is written
+ * @throws IOException if an I/O error occurs
**/
+ @java.io.Serial
private void writeObject(ObjectOutputStream out)
throws IOException
{
@@ -287,7 +292,13 @@ public class ActivationID implements Serializable {
* class corresponding to that external ref type name, in which
* case the RemoteRef
will be an instance of
* that implementation-specific class.
+ *
+ * @param in the {@code ObjectInputStream} from which data is read
+ * @throws IOException if an I/O error occurs
+ * @throws ClassNotFoundException if a serialized class cannot be loaded
+ *
*/
+ @java.io.Serial
private void readObject(ObjectInputStream in)
throws IOException, ClassNotFoundException
{
diff --git a/src/java.rmi/share/classes/java/rmi/server/RemoteObject.java b/src/java.rmi/share/classes/java/rmi/server/RemoteObject.java
index 7fbd7fcf78a..b10fb77c4d2 100644
--- a/src/java.rmi/share/classes/java/rmi/server/RemoteObject.java
+++ b/src/java.rmi/share/classes/java/rmi/server/RemoteObject.java
@@ -25,6 +25,7 @@
package java.rmi.server;
+import java.io.IOException;
import java.rmi.Remote;
import java.rmi.NoSuchObjectException;
import java.lang.reflect.Proxy;
@@ -47,6 +48,7 @@ public abstract class RemoteObject implements Remote, java.io.Serializable {
transient protected RemoteRef ref;
/** indicate compatibility with JDK 1.1.x version of class */
+ @java.io.Serial
private static final long serialVersionUID = -3215090123894869218L;
/**
@@ -357,7 +359,11 @@ public abstract class RemoteObject implements Remote, java.io.Serializable {
* "UnicastServerRef2"
, no data is written by the
* writeExternal
method or read by the
* readExternal
method.
+ *
+ * @param out the {@code ObjectOutputStream} to which data is written
+ * @throws IOException if an I/O error occurs
*/
+ @java.io.Serial
private void writeObject(java.io.ObjectOutputStream out)
throws java.io.IOException
{
@@ -418,7 +424,12 @@ public abstract class RemoteObject implements Remote, java.io.Serializable {
* class corresponding to that external ref type name, in which
* case this object's ref
field will be set to an
* instance of that implementation-specific class.
+ *
+ * @param in the {@code ObjectInputStream} from which data is read
+ * @throws IOException if an I/O error occurs
+ * @throws ClassNotFoundException if a serialized class cannot be loaded
*/
+ @java.io.Serial
private void readObject(java.io.ObjectInputStream in)
throws java.io.IOException, java.lang.ClassNotFoundException
{
diff --git a/src/java.rmi/share/classes/java/rmi/server/UnicastRemoteObject.java b/src/java.rmi/share/classes/java/rmi/server/UnicastRemoteObject.java
index 8ec91fdb251..ebc77780568 100644
--- a/src/java.rmi/share/classes/java/rmi/server/UnicastRemoteObject.java
+++ b/src/java.rmi/share/classes/java/rmi/server/UnicastRemoteObject.java
@@ -24,6 +24,7 @@
*/
package java.rmi.server;
+import java.io.IOException;
import java.io.ObjectInputFilter;
import java.rmi.*;
import sun.rmi.server.UnicastServerRef;
@@ -195,6 +196,7 @@ public class UnicastRemoteObject extends RemoteServer {
private RMIServerSocketFactory ssf = null;
/* indicate compatibility with JDK 1.1.x version of class */
+ @java.io.Serial
private static final long serialVersionUID = 4974527148936298033L;
/**
@@ -259,7 +261,13 @@ public class UnicastRemoteObject extends RemoteServer {
/**
* Re-export the remote object when it is deserialized.
+ *
+ * @param in the {@code ObjectInputStream} from which data is read
+ * @throws IOException if an I/O error occurs
+ * @throws ClassNotFoundException if a serialized class cannot be loaded
+ *
*/
+ @java.io.Serial
private void readObject(java.io.ObjectInputStream in)
throws java.io.IOException, java.lang.ClassNotFoundException
{