mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8231262: Suppress warnings on non-serializable instance fields in security libs serializable classes
Reviewed-by: mullan, chegar
This commit is contained in:
parent
a690af3832
commit
fbb4093562
18 changed files with 25 additions and 2 deletions
|
@ -50,7 +50,11 @@ public class TlsKeyMaterialSpec implements KeySpec, SecretKey {
|
|||
|
||||
private final SecretKey clientMacKey, serverMacKey;
|
||||
private final SecretKey clientCipherKey, serverCipherKey;
|
||||
private final IvParameterSpec clientIv, serverIv;
|
||||
|
||||
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||
private final IvParameterSpec clientIv;
|
||||
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||
private final IvParameterSpec serverIv;
|
||||
|
||||
/**
|
||||
* Constructs a new TlsKeymaterialSpec from the client and server MAC
|
||||
|
|
|
@ -1315,7 +1315,9 @@ public class PolicyParser {
|
|||
private static final long serialVersionUID = -4330692689482574072L;
|
||||
|
||||
private String i18nMessage;
|
||||
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||
private LocalizedMessage localizedMsg;
|
||||
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||
private Object[] source;
|
||||
|
||||
/**
|
||||
|
|
|
@ -54,6 +54,7 @@ class SubjectCodeSource extends CodeSource implements java.io.Serializable {
|
|||
private static final Class<?>[] PARAMS = { String.class };
|
||||
private static final sun.security.util.Debug debug =
|
||||
sun.security.util.Debug.getInstance("auth", "\t[Auth Access]");
|
||||
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||
private ClassLoader sysClassLoader;
|
||||
|
||||
/**
|
||||
|
|
|
@ -69,6 +69,7 @@ public class X509CertPath extends CertPath {
|
|||
/**
|
||||
* List of certificates in this chain
|
||||
*/
|
||||
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||
private List<X509Certificate> certs;
|
||||
|
||||
/**
|
||||
|
|
|
@ -70,6 +70,7 @@ public final class RSAPrivateCrtKeyImpl
|
|||
// Optional parameters associated with this RSA key
|
||||
// specified in the encoding of its AlgorithmId.
|
||||
// Must be null for "RSA" keys.
|
||||
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||
private AlgorithmParameterSpec keyParams;
|
||||
|
||||
/**
|
||||
|
|
|
@ -61,6 +61,7 @@ public final class RSAPrivateKeyImpl extends PKCS8Key implements RSAPrivateKey {
|
|||
// optional parameters associated with this RSA key
|
||||
// specified in the encoding of its AlgorithmId.
|
||||
// must be null for "RSA" keys.
|
||||
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||
private final AlgorithmParameterSpec keyParams;
|
||||
|
||||
/**
|
||||
|
|
|
@ -62,6 +62,7 @@ public final class RSAPublicKeyImpl extends X509Key implements RSAPublicKey {
|
|||
// optional parameters associated with this RSA key
|
||||
// specified in the encoding of its AlgorithmId
|
||||
// must be null for "RSA" keys.
|
||||
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||
private AlgorithmParameterSpec keyParams;
|
||||
|
||||
/**
|
||||
|
|
|
@ -98,6 +98,7 @@ class ObjectIdentifier implements Serializable
|
|||
* Changed to Object
|
||||
* @serial
|
||||
*/
|
||||
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||
private Object components = null; // path from root
|
||||
/**
|
||||
* @serial
|
||||
|
|
|
@ -62,6 +62,7 @@ public class ValidatorException extends CertificateException {
|
|||
public static final Object T_UNTRUSTED_CERT =
|
||||
"Untrusted certificate";
|
||||
|
||||
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||
private Object type;
|
||||
private X509Certificate cert;
|
||||
|
||||
|
|
|
@ -72,6 +72,7 @@ public class AlgorithmId implements Serializable, DerEncoder {
|
|||
private ObjectIdentifier algid;
|
||||
|
||||
// The (parsed) parameters
|
||||
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||
private AlgorithmParameters algParams;
|
||||
private boolean constructedFromDer = true;
|
||||
|
||||
|
@ -80,6 +81,7 @@ public class AlgorithmId implements Serializable, DerEncoder {
|
|||
* DER-encoded form; subclasses can be made to automaticaly parse
|
||||
* them so there is fast access to these parameters.
|
||||
*/
|
||||
@SuppressWarnings("serial") // Not statically typed as Serializable
|
||||
protected DerValue params;
|
||||
|
||||
|
||||
|
|
|
@ -70,6 +70,7 @@ import sun.security.provider.X509Factory;
|
|||
* @author Hemma Prafullchandra
|
||||
* @see X509CertInfo
|
||||
*/
|
||||
@SuppressWarnings("serial") // See writeReplace method in Certificate
|
||||
public class X509CertImpl extends X509Certificate implements DerEncoder {
|
||||
|
||||
@java.io.Serial
|
||||
|
|
|
@ -84,7 +84,7 @@ public class X509Key implements PublicKey {
|
|||
private int unusedBits = 0;
|
||||
|
||||
/* BitArray form of key */
|
||||
private BitArray bitStringKey = null;
|
||||
private transient BitArray bitStringKey = null;
|
||||
|
||||
/* The encoding for the key. */
|
||||
protected byte[] encodedKey;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue