mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 23:34:52 +02:00
8229999: Apply java.io.Serial annotations to security types in java.base
Reviewed-by: rriggs, mullan
This commit is contained in:
parent
470d32df73
commit
6d4ef5aaf3
158 changed files with 377 additions and 141 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 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 @@ public interface TlsMasterSecret extends SecretKey {
|
|||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings("serial")
|
||||
@java.io.Serial
|
||||
public static final long serialVersionUID = -461748105810469773L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 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
|
||||
|
@ -45,6 +45,7 @@ import javax.crypto.spec.IvParameterSpec;
|
|||
@Deprecated
|
||||
public class TlsKeyMaterialSpec implements KeySpec, SecretKey {
|
||||
|
||||
@java.io.Serial
|
||||
static final long serialVersionUID = 812912859129525028L;
|
||||
|
||||
private final SecretKey clientMacKey, serverMacKey;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 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
|
||||
|
@ -77,6 +77,7 @@ public final class ProviderList {
|
|||
// used to avoid explicit null checks in various places
|
||||
private static final Provider EMPTY_PROVIDER =
|
||||
new Provider("##Empty##", "1.0", "initialization in progress") {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 1151354171352296389L;
|
||||
// override getService() to return null slightly faster
|
||||
public Service getService(String type, String algorithm) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 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
|
||||
|
@ -53,6 +53,7 @@ import sun.security.util.*;
|
|||
public class PKCS8Key implements PrivateKey {
|
||||
|
||||
/** use serialVersionUID from JDK 1.1. for interoperability */
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -3836890099307167124L;
|
||||
|
||||
/* The algorithm information (name, parameters, etc). */
|
||||
|
@ -355,6 +356,7 @@ public class PKCS8Key implements PrivateKey {
|
|||
decode(new ByteArrayInputStream(encodedKey));
|
||||
}
|
||||
|
||||
@java.io.Serial
|
||||
protected Object writeReplace() throws java.io.ObjectStreamException {
|
||||
return new KeyRep(KeyRep.Type.PRIVATE,
|
||||
getAlgorithm(),
|
||||
|
@ -366,6 +368,7 @@ public class PKCS8Key implements PrivateKey {
|
|||
* Serialization read ... PKCS#8 keys serialize as
|
||||
* themselves, and they're parsed when they get read back.
|
||||
*/
|
||||
@java.io.Serial
|
||||
private void readObject (ObjectInputStream stream)
|
||||
throws IOException {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 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
|
||||
|
@ -35,6 +35,7 @@ import java.io.IOException;
|
|||
|
||||
public class ParsingException extends IOException {
|
||||
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -6316569918966181883L;
|
||||
|
||||
public ParsingException() {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 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
|
||||
|
@ -60,6 +60,7 @@ public final class DRBG extends SecureRandomSpi {
|
|||
|
||||
private static final String PROP_NAME = "securerandom.drbg.config";
|
||||
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 9L;
|
||||
|
||||
private transient AbstractDrbg impl;
|
||||
|
@ -273,6 +274,7 @@ public final class DRBG extends SecureRandomSpi {
|
|||
}
|
||||
}
|
||||
|
||||
@java.io.Serial
|
||||
private void readObject(java.io.ObjectInputStream s)
|
||||
throws IOException, ClassNotFoundException {
|
||||
s.defaultReadObject();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 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
|
||||
|
@ -57,6 +57,7 @@ public final class DSAPrivateKey extends PKCS8Key
|
|||
implements java.security.interfaces.DSAPrivateKey, Serializable {
|
||||
|
||||
/** use serialVersionUID from JDK 1.1. for interoperability */
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -3244453684193605938L;
|
||||
|
||||
/* the private key */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 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
|
||||
|
@ -58,6 +58,7 @@ public class DSAPublicKey extends X509Key
|
|||
implements java.security.interfaces.DSAPublicKey, Serializable {
|
||||
|
||||
/** use serialVersionUID from JDK 1.1. for interoperability */
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -2994193307391104133L;
|
||||
|
||||
/* the public key */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 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
|
||||
|
@ -42,6 +42,7 @@ import java.security.InvalidKeyException;
|
|||
|
||||
public final class DSAPublicKeyImpl extends DSAPublicKey {
|
||||
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 7819830118247182730L;
|
||||
|
||||
/**
|
||||
|
@ -70,6 +71,7 @@ public final class DSAPublicKeyImpl extends DSAPublicKey {
|
|||
super(encoded);
|
||||
}
|
||||
|
||||
@java.io.Serial
|
||||
protected Object writeReplace() throws java.io.ObjectStreamException {
|
||||
return new KeyRep(KeyRep.Type.PUBLIC,
|
||||
getAlgorithm(),
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 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
|
||||
|
@ -69,6 +69,7 @@ public final class MD4 extends DigestBase {
|
|||
static {
|
||||
md4Provider = new Provider("MD4Provider", PROVIDER_VER,
|
||||
"MD4 MessageDigest") {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -8850464997518327965L;
|
||||
};
|
||||
AccessController.doPrivileged(new PrivilegedAction<Void>() {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 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
|
||||
|
@ -35,6 +35,7 @@ import java.security.SecureRandomParameters;
|
|||
*/
|
||||
public class MoreDrbgParameters implements SecureRandomParameters, Serializable {
|
||||
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 9L;
|
||||
|
||||
final transient EntropySource es;
|
||||
|
@ -85,6 +86,7 @@ public class MoreDrbgParameters implements SecureRandomParameters, Serializable
|
|||
+ "," + capability + "," + personalizationString;
|
||||
}
|
||||
|
||||
@java.io.Serial
|
||||
private void readObject(java.io.ObjectInputStream s)
|
||||
throws IOException, ClassNotFoundException {
|
||||
s.defaultReadObject();
|
||||
|
|
|
@ -1942,6 +1942,7 @@ public class PolicyFile extends java.security.Policy {
|
|||
|
||||
private static class SelfPermission extends Permission {
|
||||
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -8315562579967246806L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 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
|
||||
|
@ -1311,6 +1311,7 @@ public class PolicyParser {
|
|||
|
||||
public static class ParsingException extends GeneralSecurityException {
|
||||
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -4330692689482574072L;
|
||||
|
||||
private String i18nMessage;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 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
|
||||
|
@ -55,6 +55,7 @@ import java.security.NoSuchProviderException;
|
|||
public final class SecureRandom extends SecureRandomSpi
|
||||
implements java.io.Serializable {
|
||||
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 3581829991155417889L;
|
||||
|
||||
private static final int DIGEST_SIZE = 20;
|
||||
|
@ -271,6 +272,7 @@ implements java.io.Serializable {
|
|||
* If you do not want this behaviour, you should re-seed the restored
|
||||
* random object, using engineSetSeed().
|
||||
*/
|
||||
@java.io.Serial
|
||||
private void readObject(java.io.ObjectInputStream s)
|
||||
throws IOException, ClassNotFoundException {
|
||||
|
||||
|
|
|
@ -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
|
||||
|
@ -46,6 +46,7 @@ import sun.security.util.ResourcesMgr;
|
|||
*/
|
||||
class SubjectCodeSource extends CodeSource implements java.io.Serializable {
|
||||
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 6039418085604715275L;
|
||||
|
||||
private Subject subject;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 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
|
||||
|
@ -37,6 +37,7 @@ import static sun.security.util.SecurityConstants.PROVIDER_VER;
|
|||
*/
|
||||
public final class Sun extends Provider {
|
||||
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 6440182097568097204L;
|
||||
|
||||
private static final String INFO = "SUN " +
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 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
|
||||
|
@ -44,6 +44,7 @@ import static sun.security.util.SecurityConstants.PROVIDER_VER;
|
|||
*/
|
||||
public final class VerificationProvider extends Provider {
|
||||
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 7482667077568930381L;
|
||||
|
||||
private static final boolean ACTIVE;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 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
|
||||
|
@ -291,6 +291,7 @@ class PKIX {
|
|||
* CertStore that generated the exception.
|
||||
*/
|
||||
static class CertStoreTypeException extends CertStoreException {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 7463352639238322556L;
|
||||
|
||||
private final String type;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 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
|
||||
|
@ -39,6 +39,7 @@ import java.security.cert.CertPathBuilderException;
|
|||
*/
|
||||
public class SunCertPathBuilderException extends CertPathBuilderException {
|
||||
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -7814288414129264709L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 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
|
||||
|
@ -63,6 +63,7 @@ import sun.security.util.DerInputStream;
|
|||
*/
|
||||
public class X509CertPath extends CertPath {
|
||||
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 4989800333263052980L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 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
|
||||
|
@ -55,6 +55,7 @@ import static sun.security.rsa.RSAUtil.KeyType;
|
|||
public final class RSAPrivateCrtKeyImpl
|
||||
extends PKCS8Key implements RSAPrivateCrtKey {
|
||||
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -1326088454257084918L;
|
||||
|
||||
private BigInteger n; // modulus
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 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
|
||||
|
@ -52,6 +52,7 @@ import sun.security.pkcs.PKCS8Key;
|
|||
*/
|
||||
public final class RSAPrivateKeyImpl extends PKCS8Key implements RSAPrivateKey {
|
||||
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -33106691987952810L;
|
||||
|
||||
private final BigInteger n; // modulus
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 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
|
||||
|
@ -52,6 +52,7 @@ import static sun.security.rsa.RSAUtil.KeyType;
|
|||
*/
|
||||
public final class RSAPublicKeyImpl extends X509Key implements RSAPublicKey {
|
||||
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 2644735423591199609L;
|
||||
private static final BigInteger THREE = BigInteger.valueOf(3);
|
||||
|
||||
|
@ -198,6 +199,7 @@ public final class RSAPublicKeyImpl extends X509Key implements RSAPublicKey {
|
|||
+ "\n public exponent: " + e;
|
||||
}
|
||||
|
||||
@java.io.Serial
|
||||
protected Object writeReplace() throws java.io.ObjectStreamException {
|
||||
return new KeyRep(KeyRep.Type.PUBLIC,
|
||||
getAlgorithm(),
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 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
|
||||
|
@ -40,6 +40,7 @@ import static sun.security.util.SecurityConstants.PROVIDER_VER;
|
|||
*/
|
||||
public final class SunRsaSign extends Provider {
|
||||
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 866040293550393045L;
|
||||
|
||||
public SunRsaSign() {
|
||||
|
|
|
@ -54,6 +54,7 @@ import static sun.security.provider.SunEntries.createAliases;
|
|||
*/
|
||||
public class SunJSSE extends java.security.Provider {
|
||||
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 3231825739635378733L;
|
||||
|
||||
private static String info = "Sun JSSE provider" +
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2004, 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
|
||||
|
@ -90,6 +90,7 @@ final class X509KeyManagerImpl extends X509ExtendedKeyManager
|
|||
// LinkedHashMap with a max size of 10
|
||||
// see LinkedHashMap JavaDocs
|
||||
private static class SizedMap<K,V> extends LinkedHashMap<K,V> {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -8211222668790986062L;
|
||||
|
||||
@Override protected boolean removeEldestEntry(Map.Entry<K,V> eldest) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 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
|
||||
|
@ -375,6 +375,7 @@ public class TSResponse {
|
|||
}
|
||||
|
||||
static final class TimestampException extends IOException {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -1631631794891940953L;
|
||||
|
||||
TimestampException(String message) {
|
||||
|
|
|
@ -44,6 +44,7 @@ import java.util.Enumeration;
|
|||
public final class LazyCodeSourcePermissionCollection
|
||||
extends PermissionCollection
|
||||
{
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -6727011328946861783L;
|
||||
private final PermissionCollection perms;
|
||||
private final CodeSource cs;
|
||||
|
@ -119,6 +120,7 @@ public final class LazyCodeSourcePermissionCollection
|
|||
* On serialization, initialize and replace with the underlying
|
||||
* permissions. This removes the laziness on deserialization.
|
||||
*/
|
||||
@java.io.Serial
|
||||
private Object writeReplace() {
|
||||
ensureAdded();
|
||||
return perms;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 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
|
||||
|
@ -91,6 +91,7 @@ class ObjectIdentifier implements Serializable
|
|||
* the 4th case, non-huge OID is still supportable in old versions, while
|
||||
* huge OID is not.
|
||||
*/
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 8697030238860181294L;
|
||||
|
||||
/**
|
||||
|
@ -106,6 +107,7 @@ class ObjectIdentifier implements Serializable
|
|||
// Is the components field calculated?
|
||||
private transient boolean componentsCalculated = false;
|
||||
|
||||
@java.io.Serial
|
||||
private void readObject(ObjectInputStream is)
|
||||
throws IOException, ClassNotFoundException {
|
||||
is.defaultReadObject();
|
||||
|
@ -119,6 +121,7 @@ class ObjectIdentifier implements Serializable
|
|||
}
|
||||
}
|
||||
|
||||
@java.io.Serial
|
||||
private void writeObject(ObjectOutputStream os)
|
||||
throws IOException {
|
||||
if (!componentsCalculated) {
|
||||
|
@ -135,6 +138,7 @@ class ObjectIdentifier implements Serializable
|
|||
}
|
||||
|
||||
static class HugeOidNotSupportedByOldJDK implements Serializable {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
static HugeOidNotSupportedByOldJDK theOne = new HugeOidNotSupportedByOldJDK();
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2004, 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
|
||||
|
@ -32,6 +32,7 @@ package sun.security.util;
|
|||
*/
|
||||
public class PendingException extends RuntimeException {
|
||||
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -5201837247928788640L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1998, 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 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
|
||||
|
@ -43,6 +43,7 @@ public class PropertyExpander {
|
|||
|
||||
public static class ExpandException extends GeneralSecurityException {
|
||||
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -7941948581406161702L;
|
||||
|
||||
public ExpandException(String msg) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 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
|
||||
|
@ -35,6 +35,7 @@ import java.security.cert.*;
|
|||
*/
|
||||
public class ValidatorException extends CertificateException {
|
||||
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -2836879718282292155L;
|
||||
|
||||
public static final Object T_NO_TRUST_ANCHOR =
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 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
|
||||
|
@ -76,6 +76,7 @@ public final
|
|||
class AlgIdDSA extends AlgorithmId implements DSAParams
|
||||
{
|
||||
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 3437177836797504046L;
|
||||
|
||||
/*
|
||||
|
|
|
@ -63,6 +63,7 @@ import sun.security.util.*;
|
|||
public class AlgorithmId implements Serializable, DerEncoder {
|
||||
|
||||
/** use serialVersionUID from JDK 1.1. for interoperability */
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 7205873507486557157L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 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
|
||||
|
@ -38,6 +38,7 @@ import java.util.Enumeration;
|
|||
*/
|
||||
public class AttributeNameEnumeration extends Vector<String> {
|
||||
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -6067440240757099134L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 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
|
||||
|
@ -39,6 +39,7 @@ package sun.security.x509;
|
|||
@Deprecated
|
||||
public class CertException extends SecurityException {
|
||||
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 6930793039696446142L;
|
||||
|
||||
// Zero is reserved.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 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
|
||||
|
@ -35,6 +35,7 @@ package sun.security.x509;
|
|||
@Deprecated
|
||||
class CertParseError extends CertException
|
||||
{
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -4559645519017017804L;
|
||||
|
||||
CertParseError (String where)
|
||||
|
|
|
@ -72,6 +72,7 @@ import sun.security.provider.X509Factory;
|
|||
*/
|
||||
public class X509CertImpl extends X509Certificate implements DerEncoder {
|
||||
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -3457612960190864406L;
|
||||
|
||||
private static final char DOT = '.';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 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
|
||||
|
@ -59,6 +59,7 @@ import sun.security.util.*;
|
|||
public class X509Key implements PublicKey {
|
||||
|
||||
/** use serialVersionUID from JDK 1.1. for interoperability */
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -5359250853002055002L;
|
||||
|
||||
/* The algorithm information (name, parameters, etc). */
|
||||
|
@ -405,6 +406,7 @@ public class X509Key implements PublicKey {
|
|||
* Serialization write ... X.509 keys serialize as
|
||||
* themselves, and they're parsed when they get read back.
|
||||
*/
|
||||
@java.io.Serial
|
||||
private void writeObject(ObjectOutputStream stream) throws IOException {
|
||||
stream.write(getEncoded());
|
||||
}
|
||||
|
@ -413,6 +415,7 @@ public class X509Key implements PublicKey {
|
|||
* Serialization read ... X.509 keys serialize as
|
||||
* themselves, and they're parsed when they get read back.
|
||||
*/
|
||||
@java.io.Serial
|
||||
private void readObject(ObjectInputStream stream) throws IOException {
|
||||
try {
|
||||
decode(stream);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue