diff --git a/src/java.smartcardio/share/classes/javax/smartcardio/ATR.java b/src/java.smartcardio/share/classes/javax/smartcardio/ATR.java index 49537c394e5..85cfa53a0db 100644 --- a/src/java.smartcardio/share/classes/javax/smartcardio/ATR.java +++ b/src/java.smartcardio/share/classes/javax/smartcardio/ATR.java @@ -25,6 +25,8 @@ package javax.smartcardio; +import java.io.IOException; +import java.io.Serial; import java.util.*; /** @@ -44,8 +46,10 @@ import java.util.*; */ public final class ATR implements java.io.Serializable { + @Serial private static final long serialVersionUID = 6695383790847736493L; + /** ATR byte array. */ private byte[] atr; private transient int startHistorical, nHistorical; @@ -156,6 +160,13 @@ public final class ATR implements java.io.Serializable { return Arrays.hashCode(atr); } + /** + * Reconstitute this object from a stream. + * + * @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 + */ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { atr = (byte[])in.readUnshared(); diff --git a/src/java.smartcardio/share/classes/javax/smartcardio/CardPermission.java b/src/java.smartcardio/share/classes/javax/smartcardio/CardPermission.java index b70de530cf1..02b0d6107fc 100644 --- a/src/java.smartcardio/share/classes/javax/smartcardio/CardPermission.java +++ b/src/java.smartcardio/share/classes/javax/smartcardio/CardPermission.java @@ -280,11 +280,24 @@ public class CardPermission extends Permission { return getName().hashCode() + 31 * mask; } + /** + * Saves this object to a stream. + * + * @param s the {@code ObjectOutputStream} to which data is written + * @throws IOException if an I/O error occurs + */ private void writeObject(ObjectOutputStream s) throws IOException { // Write out the actions. The superclass takes care of the name. s.defaultWriteObject(); } + /** + * Reconstitute this object from a stream. + * + * @param s 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 + */ private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException { // Read in the actions, then restore the mask. diff --git a/src/java.smartcardio/share/classes/javax/smartcardio/CommandAPDU.java b/src/java.smartcardio/share/classes/javax/smartcardio/CommandAPDU.java index 9f538913215..deaff4074d4 100644 --- a/src/java.smartcardio/share/classes/javax/smartcardio/CommandAPDU.java +++ b/src/java.smartcardio/share/classes/javax/smartcardio/CommandAPDU.java @@ -25,6 +25,7 @@ package javax.smartcardio; +import java.io.IOException; import java.util.Arrays; import java.nio.ByteBuffer; @@ -596,6 +597,13 @@ public final class CommandAPDU implements java.io.Serializable { return Arrays.hashCode(apdu); } + /** + * Reconstitute this object from a stream. + * + * @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 + */ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { apdu = (byte[])in.readUnshared(); diff --git a/src/java.smartcardio/share/classes/javax/smartcardio/ResponseAPDU.java b/src/java.smartcardio/share/classes/javax/smartcardio/ResponseAPDU.java index e9850da1fc3..3ed565ecb6b 100644 --- a/src/java.smartcardio/share/classes/javax/smartcardio/ResponseAPDU.java +++ b/src/java.smartcardio/share/classes/javax/smartcardio/ResponseAPDU.java @@ -25,6 +25,7 @@ package javax.smartcardio; +import java.io.IOException; import java.util.Arrays; /** @@ -176,6 +177,13 @@ public final class ResponseAPDU implements java.io.Serializable { return Arrays.hashCode(apdu); } + /** + * Reconstitute this object from a stream. + * + * @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 + */ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { apdu = (byte[])in.readUnshared(); diff --git a/src/java.smartcardio/share/classes/javax/smartcardio/TerminalFactory.java b/src/java.smartcardio/share/classes/javax/smartcardio/TerminalFactory.java index 21b8459c947..efd85d096a6 100644 --- a/src/java.smartcardio/share/classes/javax/smartcardio/TerminalFactory.java +++ b/src/java.smartcardio/share/classes/javax/smartcardio/TerminalFactory.java @@ -129,6 +129,9 @@ public final class TerminalFactory { defaultFactory = factory; } + /** + * A simple None Provider. + */ private static final class NoneProvider extends Provider { private static final long serialVersionUID = 2745808869881593918L;