8229999: Apply java.io.Serial annotations to security types in java.base

Reviewed-by: rriggs, mullan
This commit is contained in:
Joe Darcy 2019-08-29 10:52:21 -07:00
parent 470d32df73
commit 6d4ef5aaf3
158 changed files with 377 additions and 141 deletions

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2017, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -43,6 +43,7 @@ import jdk.internal.ref.CleanerFactory;
final class DESKey implements SecretKey { final class DESKey implements SecretKey {
@java.io.Serial
static final long serialVersionUID = 7724971015953279128L; static final long serialVersionUID = 7724971015953279128L;
private byte[] key; private byte[] key;
@ -136,6 +137,7 @@ final class DESKey implements SecretKey {
* readObject is called to restore the state of this key from * readObject is called to restore the state of this key from
* a stream. * a stream.
*/ */
@java.io.Serial
private void readObject(java.io.ObjectInputStream s) private void readObject(java.io.ObjectInputStream s)
throws java.io.IOException, ClassNotFoundException throws java.io.IOException, ClassNotFoundException
{ {
@ -151,6 +153,7 @@ final class DESKey implements SecretKey {
* @throws java.io.ObjectStreamException if a new object representing * @throws java.io.ObjectStreamException if a new object representing
* this DES key could not be created * this DES key could not be created
*/ */
@java.io.Serial
private Object writeReplace() throws java.io.ObjectStreamException { private Object writeReplace() throws java.io.ObjectStreamException {
return new KeyRep(KeyRep.Type.SECRET, return new KeyRep(KeyRep.Type.SECRET,
getAlgorithm(), getAlgorithm(),

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2017, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -43,6 +43,7 @@ import jdk.internal.ref.CleanerFactory;
final class DESedeKey implements SecretKey { final class DESedeKey implements SecretKey {
@java.io.Serial
static final long serialVersionUID = 2463986565756745178L; static final long serialVersionUID = 2463986565756745178L;
private byte[] key; private byte[] key;
@ -136,6 +137,7 @@ final class DESedeKey implements SecretKey {
* readObject is called to restore the state of this key from * readObject is called to restore the state of this key from
* a stream. * a stream.
*/ */
@java.io.Serial
private void readObject(java.io.ObjectInputStream s) private void readObject(java.io.ObjectInputStream s)
throws java.io.IOException, ClassNotFoundException throws java.io.IOException, ClassNotFoundException
{ {
@ -151,6 +153,7 @@ final class DESedeKey implements SecretKey {
* @throws java.io.ObjectStreamException if a new object representing * @throws java.io.ObjectStreamException if a new object representing
* this DESede key could not be created * this DESede key could not be created
*/ */
@java.io.Serial
private Object writeReplace() throws java.io.ObjectStreamException { private Object writeReplace() throws java.io.ObjectStreamException {
return new KeyRep(KeyRep.Type.SECRET, return new KeyRep(KeyRep.Type.SECRET,
getAlgorithm(), getAlgorithm(),

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2013, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -48,6 +48,7 @@ import sun.security.util.*;
final class DHPrivateKey implements PrivateKey, final class DHPrivateKey implements PrivateKey,
javax.crypto.interfaces.DHPrivateKey, Serializable { javax.crypto.interfaces.DHPrivateKey, Serializable {
@java.io.Serial
static final long serialVersionUID = 7565477590005668886L; static final long serialVersionUID = 7565477590005668886L;
// only supported version of PKCS#8 PrivateKeyInfo // only supported version of PKCS#8 PrivateKeyInfo
@ -313,6 +314,7 @@ javax.crypto.interfaces.DHPrivateKey, Serializable {
* @throws java.io.ObjectStreamException if a new object representing * @throws java.io.ObjectStreamException if a new object representing
* this DH private key could not be created * this DH private key could not be created
*/ */
@java.io.Serial
private Object writeReplace() throws java.io.ObjectStreamException { private Object writeReplace() throws java.io.ObjectStreamException {
return new KeyRep(KeyRep.Type.PRIVATE, return new KeyRep(KeyRep.Type.PRIVATE,
getAlgorithm(), getAlgorithm(),

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -48,6 +48,7 @@ import sun.security.util.*;
final class DHPublicKey implements PublicKey, final class DHPublicKey implements PublicKey,
javax.crypto.interfaces.DHPublicKey, Serializable { javax.crypto.interfaces.DHPublicKey, Serializable {
@java.io.Serial
static final long serialVersionUID = 7647557958927458271L; static final long serialVersionUID = 7647557958927458271L;
// the public key // the public key
@ -314,6 +315,7 @@ javax.crypto.interfaces.DHPublicKey, Serializable {
* @throws java.io.ObjectStreamException if a new object representing * @throws java.io.ObjectStreamException if a new object representing
* this DH public key could not be created * this DH public key could not be created
*/ */
@java.io.Serial
private Object writeReplace() throws java.io.ObjectStreamException { private Object writeReplace() throws java.io.ObjectStreamException {
return new KeyRep(KeyRep.Type.PUBLIC, return new KeyRep(KeyRep.Type.PUBLIC,
getAlgorithm(), getAlgorithm(),

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -44,6 +44,7 @@ import jdk.internal.ref.CleanerFactory;
*/ */
final class PBEKey implements SecretKey { final class PBEKey implements SecretKey {
@java.io.Serial
static final long serialVersionUID = -2234768909660948176L; static final long serialVersionUID = -2234768909660948176L;
private byte[] key; private byte[] key;
@ -146,6 +147,7 @@ final class PBEKey implements SecretKey {
* readObject is called to restore the state of this key from * readObject is called to restore the state of this key from
* a stream. * a stream.
*/ */
@java.io.Serial
private void readObject(java.io.ObjectInputStream s) private void readObject(java.io.ObjectInputStream s)
throws java.io.IOException, ClassNotFoundException throws java.io.IOException, ClassNotFoundException
{ {
@ -162,6 +164,7 @@ final class PBEKey implements SecretKey {
* @throws java.io.ObjectStreamException if a new object representing * @throws java.io.ObjectStreamException if a new object representing
* this PBE key could not be created * this PBE key could not be created
*/ */
@java.io.Serial
private Object writeReplace() throws java.io.ObjectStreamException { private Object writeReplace() throws java.io.ObjectStreamException {
return new KeyRep(KeyRep.Type.SECRET, return new KeyRep(KeyRep.Type.SECRET,
getAlgorithm(), getAlgorithm(),

View file

@ -55,6 +55,7 @@ import jdk.internal.ref.CleanerFactory;
*/ */
final class PBKDF2KeyImpl implements javax.crypto.interfaces.PBEKey { final class PBKDF2KeyImpl implements javax.crypto.interfaces.PBEKey {
@java.io.Serial
static final long serialVersionUID = -2234868909660948157L; static final long serialVersionUID = -2234868909660948157L;
private char[] passwd; private char[] passwd;
@ -146,6 +147,7 @@ final class PBKDF2KeyImpl implements javax.crypto.interfaces.PBEKey {
byte[] ti = new byte[hlen]; byte[] ti = new byte[hlen];
// SecretKeySpec cannot be used, since password can be empty here. // SecretKeySpec cannot be used, since password can be empty here.
SecretKey macKey = new SecretKey() { SecretKey macKey = new SecretKey() {
@java.io.Serial
private static final long serialVersionUID = 7874493593505141603L; private static final long serialVersionUID = 7874493593505141603L;
@Override @Override
public String getAlgorithm() { public String getAlgorithm() {
@ -278,6 +280,7 @@ final class PBKDF2KeyImpl implements javax.crypto.interfaces.PBEKey {
* @throws ObjectStreamException if a new object representing * @throws ObjectStreamException if a new object representing
* this PBE key could not be created * this PBE key could not be created
*/ */
@java.io.Serial
private Object writeReplace() throws ObjectStreamException { private Object writeReplace() throws ObjectStreamException {
return new KeyRep(KeyRep.Type.SECRET, getAlgorithm(), return new KeyRep(KeyRep.Type.SECRET, getAlgorithm(),
getFormat(), getEncoded()); getFormat(), getEncoded());

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1998, 2018, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -33,6 +33,7 @@ import javax.crypto.*;
final class SealedObjectForKeyProtector extends SealedObject { final class SealedObjectForKeyProtector extends SealedObject {
@java.io.Serial
static final long serialVersionUID = -3650226485480866989L; static final long serialVersionUID = -3650226485480866989L;
/** /**

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -79,6 +79,7 @@ import static sun.security.provider.SunEntries.createAliasesWithOid;
public final class SunJCE extends Provider { public final class SunJCE extends Provider {
@java.io.Serial
private static final long serialVersionUID = 6812507587804302833L; private static final long serialVersionUID = 6812507587804302833L;
private static final String info = "SunJCE Provider " + private static final String info = "SunJCE Provider " +

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2017, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -154,6 +154,7 @@ public final class TlsMasterSecretGenerator extends KeyGeneratorSpi {
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
private static final class TlsMasterSecretKey implements TlsMasterSecret { private static final class TlsMasterSecretKey implements TlsMasterSecret {
@java.io.Serial
private static final long serialVersionUID = 1019571680375368880L; private static final long serialVersionUID = 1019571680375368880L;
private byte[] key; private byte[] key;

View file

@ -54,6 +54,7 @@ import java.util.Vector;
@SuppressWarnings("removal") @SuppressWarnings("removal")
@Deprecated(since="9", forRemoval=true) @Deprecated(since="9", forRemoval=true)
public class X509V1CertImpl extends X509Certificate implements Serializable { public class X509V1CertImpl extends X509Certificate implements Serializable {
@java.io.Serial
static final long serialVersionUID = -2048442350420423405L; static final long serialVersionUID = -2048442350420423405L;
private java.security.cert.X509Certificate wrappedCert; private java.security.cert.X509Certificate wrappedCert;
@ -307,6 +308,7 @@ public class X509V1CertImpl extends X509Certificate implements Serializable {
return wrappedCert.getSigAlgParams(); return wrappedCert.getSigAlgParams();
} }
@java.io.Serial
private synchronized void writeObject(ObjectOutputStream stream) private synchronized void writeObject(ObjectOutputStream stream)
throws IOException { throws IOException {
try { try {
@ -316,6 +318,7 @@ public class X509V1CertImpl extends X509Certificate implements Serializable {
} }
} }
@java.io.Serial
private synchronized void readObject(ObjectInputStream stream) private synchronized void readObject(ObjectInputStream stream)
throws IOException { throws IOException {
try { try {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -31,6 +31,7 @@ import java.security.GeneralSecurityException;
* An NTLM-related Exception * An NTLM-related Exception
*/ */
public final class NTLMException extends GeneralSecurityException { public final class NTLMException extends GeneralSecurityException {
@java.io.Serial
private static final long serialVersionUID = -3298539507906689430L; private static final long serialVersionUID = -3298539507906689430L;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2013, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -43,6 +43,7 @@ package java.security;
public class AccessControlException extends SecurityException { public class AccessControlException extends SecurityException {
@java.io.Serial
private static final long serialVersionUID = 5138225684096988535L; private static final long serialVersionUID = 5138225684096988535L;
// the permission that caused the exception to be thrown. // the permission that caused the exception to be thrown.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1998, 2015, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -58,6 +58,7 @@ import sun.security.util.SecurityConstants;
public final class AllPermission extends Permission { public final class AllPermission extends Permission {
@java.io.Serial
private static final long serialVersionUID = -2916474571451318075L; private static final long serialVersionUID = -2916474571451318075L;
/** /**
@ -157,6 +158,7 @@ final class AllPermissionCollection
{ {
// use serialVersionUID from JDK 1.2.2 for interoperability // use serialVersionUID from JDK 1.2.2 for interoperability
@java.io.Serial
private static final long serialVersionUID = -4023755556366636806L; private static final long serialVersionUID = -4023755556366636806L;
private boolean all_allowed; // true if any all permissions have been added private boolean all_allowed; // true if any all permissions have been added

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -41,6 +41,7 @@ import javax.security.auth.callback.CallbackHandler;
*/ */
public abstract class AuthProvider extends Provider { public abstract class AuthProvider extends Provider {
@java.io.Serial
private static final long serialVersionUID = 4197859053084546461L; private static final long serialVersionUID = 4197859053084546461L;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2015, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -69,6 +69,7 @@ public abstract class BasicPermission extends Permission
implements java.io.Serializable implements java.io.Serializable
{ {
@java.io.Serial
private static final long serialVersionUID = 6279438298436773498L; private static final long serialVersionUID = 6279438298436773498L;
// does this permission have a wildcard at the end? // does this permission have a wildcard at the end?
@ -260,6 +261,7 @@ public abstract class BasicPermission extends Permission
* readObject is called to restore the state of the BasicPermission from * readObject is called to restore the state of the BasicPermission from
* a stream. * a stream.
*/ */
@java.io.Serial
private void readObject(ObjectInputStream s) private void readObject(ObjectInputStream s)
throws IOException, ClassNotFoundException throws IOException, ClassNotFoundException
{ {
@ -305,6 +307,7 @@ final class BasicPermissionCollection
implements java.io.Serializable implements java.io.Serializable
{ {
@java.io.Serial
private static final long serialVersionUID = 739301742472979399L; private static final long serialVersionUID = 739301742472979399L;
/** /**
@ -478,6 +481,7 @@ final class BasicPermissionCollection
* The class to which all BasicPermissions in this * The class to which all BasicPermissions in this
* BasicPermissionCollection belongs. * BasicPermissionCollection belongs.
*/ */
@java.io.Serial
private static final ObjectStreamField[] serialPersistentFields = { private static final ObjectStreamField[] serialPersistentFields = {
new ObjectStreamField("permissions", Hashtable.class), new ObjectStreamField("permissions", Hashtable.class),
new ObjectStreamField("all_allowed", Boolean.TYPE), new ObjectStreamField("all_allowed", Boolean.TYPE),
@ -492,6 +496,7 @@ final class BasicPermissionCollection
* serialization compatibility with earlier releases. all_allowed * serialization compatibility with earlier releases. all_allowed
* and permClass unchanged. * and permClass unchanged.
*/ */
@java.io.Serial
private void writeObject(ObjectOutputStream out) throws IOException { private void writeObject(ObjectOutputStream out) throws IOException {
// Don't call out.defaultWriteObject() // Don't call out.defaultWriteObject()
@ -513,6 +518,7 @@ final class BasicPermissionCollection
* readObject is called to restore the state of the * readObject is called to restore the state of the
* BasicPermissionCollection from a stream. * BasicPermissionCollection from a stream.
*/ */
@java.io.Serial
private void readObject(java.io.ObjectInputStream in) private void readObject(java.io.ObjectInputStream in)
throws IOException, ClassNotFoundException throws IOException, ClassNotFoundException
{ {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2003, 2013, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -38,6 +38,7 @@ import java.security.cert.CertPath;
public final class CodeSigner implements Serializable { public final class CodeSigner implements Serializable {
@java.io.Serial
private static final long serialVersionUID = 6819288105193937581L; private static final long serialVersionUID = 6819288105193937581L;
/** /**
@ -165,6 +166,7 @@ public final class CodeSigner implements Serializable {
} }
// Explicitly reset hash code value to -1 // Explicitly reset hash code value to -1
@java.io.Serial
private void readObject(ObjectInputStream ois) private void readObject(ObjectInputStream ois)
throws IOException, ClassNotFoundException { throws IOException, ClassNotFoundException {
ois.defaultReadObject(); ois.defaultReadObject();

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2017, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -50,6 +50,7 @@ import sun.security.util.IOUtils;
public class CodeSource implements java.io.Serializable { public class CodeSource implements java.io.Serializable {
@java.io.Serial
private static final long serialVersionUID = 4977541819976013951L; private static final long serialVersionUID = 4977541819976013951L;
/** /**
@ -522,6 +523,7 @@ public class CodeSource implements java.io.Serializable {
* array of bytes. Finally, if any code signers are present then the array * array of bytes. Finally, if any code signers are present then the array
* of code signers is serialized and written out too. * of code signers is serialized and written out too.
*/ */
@java.io.Serial
private void writeObject(java.io.ObjectOutputStream oos) private void writeObject(java.io.ObjectOutputStream oos)
throws IOException throws IOException
{ {
@ -556,6 +558,7 @@ public class CodeSource implements java.io.Serializable {
/** /**
* Restores this object from a stream (i.e., deserializes it). * Restores this object from a stream (i.e., deserializes it).
*/ */
@java.io.Serial
private void readObject(java.io.ObjectInputStream ois) private void readObject(java.io.ObjectInputStream ois)
throws IOException, ClassNotFoundException throws IOException, ClassNotFoundException
{ {

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -33,6 +33,7 @@ package java.security;
*/ */
public class DigestException extends GeneralSecurityException { public class DigestException extends GeneralSecurityException {
@java.io.Serial
private static final long serialVersionUID = 5821450303093652515L; private static final long serialVersionUID = 5821450303093652515L;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2013, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -36,6 +36,7 @@ package java.security;
public class GeneralSecurityException extends Exception { public class GeneralSecurityException extends Exception {
@java.io.Serial
private static final long serialVersionUID = 894798122053539237L; private static final long serialVersionUID = 894798122053539237L;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2013, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -49,6 +49,7 @@ package java.security;
public class GuardedObject implements java.io.Serializable { public class GuardedObject implements java.io.Serializable {
@java.io.Serial
private static final long serialVersionUID = -5240450096227834308L; private static final long serialVersionUID = -5240450096227834308L;
private Object object; // the object we are guarding private Object object; // the object we are guarding
@ -92,6 +93,7 @@ public class GuardedObject implements java.io.Serializable {
* Writes this object out to a stream (i.e., serializes it). * Writes this object out to a stream (i.e., serializes it).
* We check the guard if there is one. * We check the guard if there is one.
*/ */
@java.io.Serial
private void writeObject(java.io.ObjectOutputStream oos) private void writeObject(java.io.ObjectOutputStream oos)
throws java.io.IOException throws java.io.IOException
{ {

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -62,6 +62,7 @@ import java.util.*;
public abstract class Identity implements Principal, Serializable { public abstract class Identity implements Principal, Serializable {
/** use serialVersionUID from JDK 1.1.x for interoperability */ /** use serialVersionUID from JDK 1.1.x for interoperability */
@java.io.Serial
private static final long serialVersionUID = 3609922007826600659L; private static final long serialVersionUID = 3609922007826600659L;
/** /**

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -67,6 +67,7 @@ import java.util.Properties;
public abstract public abstract
class IdentityScope extends Identity { class IdentityScope extends Identity {
@java.io.Serial
private static final long serialVersionUID = -2337346281189773310L; private static final long serialVersionUID = -2337346281189773310L;
/* The system's scope */ /* The system's scope */

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2013, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -40,6 +40,7 @@ package java.security;
public class InvalidAlgorithmParameterException public class InvalidAlgorithmParameterException
extends GeneralSecurityException { extends GeneralSecurityException {
@java.io.Serial
private static final long serialVersionUID = 2864672297499471472L; private static final long serialVersionUID = 2864672297499471472L;
/** /**

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -36,6 +36,7 @@ package java.security;
public class InvalidKeyException extends KeyException { public class InvalidKeyException extends KeyException {
@java.io.Serial
private static final long serialVersionUID = 5698479920593359816L; private static final long serialVersionUID = 5698479920593359816L;
/** /**

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -36,6 +36,7 @@ package java.security;
public class InvalidParameterException extends IllegalArgumentException { public class InvalidParameterException extends IllegalArgumentException {
@java.io.Serial
private static final long serialVersionUID = -857968536935667808L; private static final long serialVersionUID = -857968536935667808L;
/** /**

View file

@ -114,6 +114,7 @@ public interface Key extends java.io.Serializable {
*/ */
@Deprecated @Deprecated
@SuppressWarnings("serial") @SuppressWarnings("serial")
@java.io.Serial
static final long serialVersionUID = 6603384152749567654L; static final long serialVersionUID = 6603384152749567654L;
/** /**

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -38,6 +38,7 @@ package java.security;
public class KeyException extends GeneralSecurityException { public class KeyException extends GeneralSecurityException {
@java.io.Serial
private static final long serialVersionUID = -7483676942812432108L; private static final long serialVersionUID = -7483676942812432108L;
/** /**

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -46,6 +46,7 @@ package java.security;
public class KeyManagementException extends KeyException { public class KeyManagementException extends KeyException {
@java.io.Serial
private static final long serialVersionUID = 947674216157062695L; private static final long serialVersionUID = 947674216157062695L;
/** /**

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -41,6 +41,7 @@ import java.util.*;
public final class KeyPair implements java.io.Serializable { public final class KeyPair implements java.io.Serializable {
@java.io.Serial
private static final long serialVersionUID = -7565189502268009837L; private static final long serialVersionUID = -7565189502268009837L;
private PrivateKey privateKey; private PrivateKey privateKey;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2003, 2017, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -57,6 +57,7 @@ import javax.crypto.spec.SecretKeySpec;
public class KeyRep implements Serializable { public class KeyRep implements Serializable {
@java.io.Serial
private static final long serialVersionUID = -4757683898830641853L; private static final long serialVersionUID = -4757683898830641853L;
/** /**
@ -162,6 +163,7 @@ public class KeyRep implements Serializable {
* encoded key bytes are unrecognized/invalid, of if the * encoded key bytes are unrecognized/invalid, of if the
* resolution of the key fails for any reason * resolution of the key fails for any reason
*/ */
@java.io.Serial
protected Object readResolve() throws ObjectStreamException { protected Object readResolve() throws ObjectStreamException {
try { try {
if (type == Type.SECRET && RAW.equals(format)) { if (type == Type.SECRET && RAW.equals(format)) {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2013, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -36,6 +36,7 @@ package java.security;
public class KeyStoreException extends GeneralSecurityException { public class KeyStoreException extends GeneralSecurityException {
@java.io.Serial
private static final long serialVersionUID = -1119353179322377262L; private static final long serialVersionUID = -1119353179322377262L;
/** /**

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -35,6 +35,7 @@ package java.security;
public class NoSuchAlgorithmException extends GeneralSecurityException { public class NoSuchAlgorithmException extends GeneralSecurityException {
@java.io.Serial
private static final long serialVersionUID = -7443947487218346562L; private static final long serialVersionUID = -7443947487218346562L;
/** /**

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -35,6 +35,7 @@ package java.security;
public class NoSuchProviderException extends GeneralSecurityException { public class NoSuchProviderException extends GeneralSecurityException {
@java.io.Serial
private static final long serialVersionUID = 8488111756688534474L; private static final long serialVersionUID = 8488111756688534474L;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2013, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -65,6 +65,7 @@ package java.security;
public abstract class Permission implements Guard, java.io.Serializable { public abstract class Permission implements Guard, java.io.Serializable {
@java.io.Serial
private static final long serialVersionUID = -5636570222231596674L; private static final long serialVersionUID = -5636570222231596674L;
private String name; private String name;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2015, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -96,6 +96,7 @@ import java.util.stream.StreamSupport;
public abstract class PermissionCollection implements java.io.Serializable { public abstract class PermissionCollection implements java.io.Serializable {
@java.io.Serial
private static final long serialVersionUID = -6727011328946861783L; private static final long serialVersionUID = -6727011328946861783L;
// when set, add will throw an exception. // when set, add will throw an exception.

View file

@ -328,6 +328,7 @@ implements Serializable
return pc; return pc;
} }
@java.io.Serial
private static final long serialVersionUID = 4858622370623524688L; private static final long serialVersionUID = 4858622370623524688L;
// Need to maintain serialization interoperability with earlier releases, // Need to maintain serialization interoperability with earlier releases,
@ -339,6 +340,7 @@ implements Serializable
* A table of the Permission classes and PermissionCollections. * A table of the Permission classes and PermissionCollections.
* @serialField allPermission java.security.PermissionCollection * @serialField allPermission java.security.PermissionCollection
*/ */
@java.io.Serial
private static final ObjectStreamField[] serialPersistentFields = { private static final ObjectStreamField[] serialPersistentFields = {
new ObjectStreamField("perms", Hashtable.class), new ObjectStreamField("perms", Hashtable.class),
new ObjectStreamField("allPermission", PermissionCollection.class), new ObjectStreamField("allPermission", PermissionCollection.class),
@ -352,6 +354,7 @@ implements Serializable
* serialization compatibility with earlier releases. allPermission * serialization compatibility with earlier releases. allPermission
* unchanged. * unchanged.
*/ */
@java.io.Serial
private void writeObject(ObjectOutputStream out) throws IOException { private void writeObject(ObjectOutputStream out) throws IOException {
// Don't call out.defaultWriteObject() // Don't call out.defaultWriteObject()
@ -372,6 +375,7 @@ implements Serializable
* Reads in a Hashtable of Class/PermissionCollections and saves them in the * Reads in a Hashtable of Class/PermissionCollections and saves them in the
* permsMap field. Reads in allPermission. * permsMap field. Reads in allPermission.
*/ */
@java.io.Serial
private void readObject(ObjectInputStream in) throws IOException, private void readObject(ObjectInputStream in) throws IOException,
ClassNotFoundException { ClassNotFoundException {
// Don't call defaultReadObject() // Don't call defaultReadObject()
@ -547,6 +551,7 @@ implements Serializable
return permsMap.elements(); return permsMap.elements();
} }
@java.io.Serial
private static final long serialVersionUID = -8491988220802933440L; private static final long serialVersionUID = -8491988220802933440L;
// Need to maintain serialization interoperability with earlier releases, // Need to maintain serialization interoperability with earlier releases,
// which had the serializable field: // which had the serializable field:
@ -555,6 +560,7 @@ implements Serializable
* @serialField perms java.util.Hashtable * @serialField perms java.util.Hashtable
* A table of the Permissions (both key and value are same). * A table of the Permissions (both key and value are same).
*/ */
@java.io.Serial
private static final ObjectStreamField[] serialPersistentFields = { private static final ObjectStreamField[] serialPersistentFields = {
new ObjectStreamField("perms", Hashtable.class), new ObjectStreamField("perms", Hashtable.class),
}; };
@ -566,6 +572,7 @@ implements Serializable
* Writes the contents of the permsMap field out as a Hashtable for * Writes the contents of the permsMap field out as a Hashtable for
* serialization compatibility with earlier releases. * serialization compatibility with earlier releases.
*/ */
@java.io.Serial
private void writeObject(ObjectOutputStream out) throws IOException { private void writeObject(ObjectOutputStream out) throws IOException {
// Don't call out.defaultWriteObject() // Don't call out.defaultWriteObject()
@ -584,6 +591,7 @@ implements Serializable
* Reads in a Hashtable of Permission/Permission and saves them in the * Reads in a Hashtable of Permission/Permission and saves them in the
* permsMap field. * permsMap field.
*/ */
@java.io.Serial
private void readObject(ObjectInputStream in) throws IOException, private void readObject(ObjectInputStream in) throws IOException,
ClassNotFoundException { ClassNotFoundException {
// Don't call defaultReadObject() // Don't call defaultReadObject()

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2017, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -818,6 +818,7 @@ public abstract class Policy {
private static class UnsupportedEmptyCollection private static class UnsupportedEmptyCollection
extends PermissionCollection { extends PermissionCollection {
@java.io.Serial
private static final long serialVersionUID = -8492269157353014774L; private static final long serialVersionUID = -8492269157353014774L;
private Permissions perms; private Permissions perms;

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -69,5 +69,6 @@ public interface PrivateKey extends Key, javax.security.auth.Destroyable {
*/ */
@Deprecated @Deprecated
@SuppressWarnings("serial") @SuppressWarnings("serial")
@java.io.Serial
static final long serialVersionUID = 6034044314589513430L; static final long serialVersionUID = 6034044314589513430L;
} }

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1998, 2018, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -56,6 +56,7 @@ import jdk.internal.access.SharedSecrets;
*/ */
public class PrivilegedActionException extends Exception { public class PrivilegedActionException extends Exception {
// use serialVersionUID from JDK 1.2.2 for interoperability // use serialVersionUID from JDK 1.2.2 for interoperability
@java.io.Serial
private static final long serialVersionUID = 4724086851538908602L; private static final long serialVersionUID = 4724086851538908602L;
/** /**
@ -99,6 +100,7 @@ public class PrivilegedActionException extends Exception {
* *
* @serialField undeclaredThrowable Throwable * @serialField undeclaredThrowable Throwable
*/ */
@java.io.Serial
private static final ObjectStreamField[] serialPersistentFields = { private static final ObjectStreamField[] serialPersistentFields = {
new ObjectStreamField("exception", Exception.class) new ObjectStreamField("exception", Exception.class)
}; };
@ -112,6 +114,7 @@ public class PrivilegedActionException extends Exception {
* field in the older implementation and PrivilegedActionException::cause * field in the older implementation and PrivilegedActionException::cause
* was set to null. * was set to null.
*/ */
@java.io.Serial
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException { private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException {
ObjectInputStream.GetField fields = s.readFields(); ObjectInputStream.GetField fields = s.readFields();
Exception exception = (Exception) fields.get("exception", null); Exception exception = (Exception) fields.get("exception", null);
@ -124,6 +127,7 @@ public class PrivilegedActionException extends Exception {
* To maintain compatibility with older implementation, write a serial * To maintain compatibility with older implementation, write a serial
* "exception" field with the cause as the value. * "exception" field with the cause as the value.
*/ */
@java.io.Serial
private void writeObject(ObjectOutputStream out) throws IOException { private void writeObject(ObjectOutputStream out) throws IOException {
ObjectOutputStream.PutField fields = out.putFields(); ObjectOutputStream.PutField fields = out.putFields();
fields.put("exception", super.getCause()); fields.put("exception", super.getCause());

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -108,6 +108,7 @@ import java.util.concurrent.ConcurrentHashMap;
public abstract class Provider extends Properties { public abstract class Provider extends Properties {
// Declare serialVersionUID to be compatible with JDK1.1 // Declare serialVersionUID to be compatible with JDK1.1
@java.io.Serial
private static final long serialVersionUID = -4298000515446427739L; private static final long serialVersionUID = -4298000515446427739L;
private static final sun.security.util.Debug debug = private static final sun.security.util.Debug debug =
@ -890,6 +891,7 @@ public abstract class Provider extends Properties {
* @param in the {@code ObjectInputStream} to read * @param in the {@code ObjectInputStream} to read
* @serial * @serial
*/ */
@java.io.Serial
private void readObject(ObjectInputStream in) private void readObject(ObjectInputStream in)
throws IOException, ClassNotFoundException { throws IOException, ClassNotFoundException {
Map<Object,Object> copy = new HashMap<>(); Map<Object,Object> copy = new HashMap<>();

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -36,6 +36,7 @@ package java.security;
*/ */
public class ProviderException extends RuntimeException { public class ProviderException extends RuntimeException {
@java.io.Serial
private static final long serialVersionUID = 5256023526693665674L; private static final long serialVersionUID = 5256023526693665674L;
/** /**

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -55,5 +55,6 @@ public interface PublicKey extends Key {
*/ */
@Deprecated @Deprecated
@SuppressWarnings("serial") @SuppressWarnings("serial")
@java.io.Serial
static final long serialVersionUID = 7187392471159151072L; static final long serialVersionUID = 7187392471159151072L;
} }

View file

@ -1032,6 +1032,7 @@ public class SecureRandom extends java.util.Random {
} }
// Declare serialVersionUID to be compatible with JDK1.1 // Declare serialVersionUID to be compatible with JDK1.1
@java.io.Serial
static final long serialVersionUID = 4940670005562187L; static final long serialVersionUID = 4940670005562187L;
// Retain unused values serialized from JDK1.1 // Retain unused values serialized from JDK1.1

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1998, 2017, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -84,6 +84,7 @@ package java.security;
public abstract class SecureRandomSpi implements java.io.Serializable { public abstract class SecureRandomSpi implements java.io.Serializable {
@java.io.Serial
private static final long serialVersionUID = -2991854161009191830L; private static final long serialVersionUID = -2991854161009191830L;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2017, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -338,6 +338,7 @@ import java.util.StringTokenizer;
public final class SecurityPermission extends BasicPermission { public final class SecurityPermission extends BasicPermission {
@java.io.Serial
private static final long serialVersionUID = 5236109936224050470L; private static final long serialVersionUID = 5236109936224050470L;
/** /**

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -34,6 +34,7 @@ package java.security;
public class SignatureException extends GeneralSecurityException { public class SignatureException extends GeneralSecurityException {
@java.io.Serial
private static final long serialVersionUID = 7509989324975124438L; private static final long serialVersionUID = 7509989324975124438L;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2017, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -118,6 +118,7 @@ import java.io.*;
public final class SignedObject implements Serializable { public final class SignedObject implements Serializable {
@java.io.Serial
private static final long serialVersionUID = 720502720485447167L; private static final long serialVersionUID = 720502720485447167L;
/* /*
@ -250,6 +251,7 @@ public final class SignedObject implements Serializable {
* readObject is called to restore the state of the SignedObject from * readObject is called to restore the state of the SignedObject from
* a stream. * a stream.
*/ */
@java.io.Serial
private void readObject(java.io.ObjectInputStream s) private void readObject(java.io.ObjectInputStream s)
throws java.io.IOException, ClassNotFoundException { throws java.io.IOException, ClassNotFoundException {
java.io.ObjectInputStream.GetField fields = s.readFields(); java.io.ObjectInputStream.GetField fields = s.readFields();

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -49,6 +49,7 @@ import java.io.*;
@SuppressWarnings("removal") @SuppressWarnings("removal")
public abstract class Signer extends Identity { public abstract class Signer extends Identity {
@java.io.Serial
private static final long serialVersionUID = -1763464102261361480L; private static final long serialVersionUID = -1763464102261361480L;
/** /**

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -44,6 +44,7 @@ import java.util.List;
public final class Timestamp implements Serializable { public final class Timestamp implements Serializable {
@java.io.Serial
private static final long serialVersionUID = -5502683707821851294L; private static final long serialVersionUID = -5502683707821851294L;
/** /**
@ -155,6 +156,7 @@ public final class Timestamp implements Serializable {
} }
// Explicitly reset hash code value to -1 // Explicitly reset hash code value to -1
@java.io.Serial
private void readObject(ObjectInputStream ois) private void readObject(ObjectInputStream ois)
throws IOException, ClassNotFoundException { throws IOException, ClassNotFoundException {
ois.defaultReadObject(); ois.defaultReadObject();

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2003, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -34,6 +34,7 @@ package java.security;
public class UnrecoverableEntryException extends GeneralSecurityException { public class UnrecoverableEntryException extends GeneralSecurityException {
@java.io.Serial
private static final long serialVersionUID = -4527142945246286535L; private static final long serialVersionUID = -4527142945246286535L;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2005, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -34,6 +34,7 @@ package java.security;
public class UnrecoverableKeyException extends UnrecoverableEntryException { public class UnrecoverableKeyException extends UnrecoverableEntryException {
@java.io.Serial
private static final long serialVersionUID = 7275063078190151277L; private static final long serialVersionUID = 7275063078190151277L;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2017, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -107,6 +107,7 @@ public final class UnresolvedPermission extends Permission
implements java.io.Serializable implements java.io.Serializable
{ {
@java.io.Serial
private static final long serialVersionUID = -4821973115467008846L; private static final long serialVersionUID = -4821973115467008846L;
private static final sun.security.util.Debug debug = private static final sun.security.util.Debug debug =
@ -521,6 +522,7 @@ implements java.io.Serializable
* followed by the certificate encoding itself which is written out as an * followed by the certificate encoding itself which is written out as an
* array of bytes. * array of bytes.
*/ */
@java.io.Serial
private void writeObject(java.io.ObjectOutputStream oos) private void writeObject(java.io.ObjectOutputStream oos)
throws IOException throws IOException
{ {
@ -549,6 +551,7 @@ implements java.io.Serializable
/** /**
* Restores this object from a stream (i.e., deserializes it). * Restores this object from a stream (i.e., deserializes it).
*/ */
@java.io.Serial
private void readObject(java.io.ObjectInputStream ois) private void readObject(java.io.ObjectInputStream ois)
throws IOException, ClassNotFoundException throws IOException, ClassNotFoundException
{ {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2015, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -137,6 +137,7 @@ implements java.io.Serializable
return Collections.enumeration(results); return Collections.enumeration(results);
} }
@java.io.Serial
private static final long serialVersionUID = -7176153071733132400L; private static final long serialVersionUID = -7176153071733132400L;
// Need to maintain serialization interoperability with earlier releases, // Need to maintain serialization interoperability with earlier releases,
@ -148,6 +149,7 @@ implements java.io.Serializable
* A table of the UnresolvedPermissions keyed on type, value is Vector * A table of the UnresolvedPermissions keyed on type, value is Vector
* of permissions * of permissions
*/ */
@java.io.Serial
private static final ObjectStreamField[] serialPersistentFields = { private static final ObjectStreamField[] serialPersistentFields = {
new ObjectStreamField("permissions", Hashtable.class), new ObjectStreamField("permissions", Hashtable.class),
}; };
@ -160,6 +162,7 @@ implements java.io.Serializable
* in which the values are Vectors for * in which the values are Vectors for
* serialization compatibility with earlier releases. * serialization compatibility with earlier releases.
*/ */
@java.io.Serial
private void writeObject(ObjectOutputStream out) throws IOException { private void writeObject(ObjectOutputStream out) throws IOException {
// Don't call out.defaultWriteObject() // Don't call out.defaultWriteObject()
@ -188,6 +191,7 @@ implements java.io.Serializable
* Reads in a Hashtable in which the values are Vectors of * Reads in a Hashtable in which the values are Vectors of
* UnresolvedPermissions and saves them in the perms field. * UnresolvedPermissions and saves them in the perms field.
*/ */
@java.io.Serial
private void readObject(ObjectInputStream in) throws IOException, private void readObject(ObjectInputStream in) throws IOException,
ClassNotFoundException { ClassNotFoundException {
// Don't call defaultReadObject() // Don't call defaultReadObject()

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2013, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -35,6 +35,7 @@ import java.security.GeneralSecurityException;
*/ */
public class CRLException extends GeneralSecurityException { public class CRLException extends GeneralSecurityException {
@java.io.Serial
private static final long serialVersionUID = -6694728944094197147L; private static final long serialVersionUID = -6694728944094197147L;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2000, 2017, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -119,6 +119,7 @@ import java.util.List;
*/ */
public abstract class CertPath implements Serializable { public abstract class CertPath implements Serializable {
@java.io.Serial
private static final long serialVersionUID = 6068470306649138683L; private static final long serialVersionUID = 6068470306649138683L;
private String type; // the type of certificates in this chain private String type; // the type of certificates in this chain
@ -282,6 +283,7 @@ public abstract class CertPath implements Serializable {
* @throws ObjectStreamException if a {@code CertPathRep} object * @throws ObjectStreamException if a {@code CertPathRep} object
* representing this certification path could not be created * representing this certification path could not be created
*/ */
@java.io.Serial
protected Object writeReplace() throws ObjectStreamException { protected Object writeReplace() throws ObjectStreamException {
try { try {
return new CertPathRep(type, getEncoded()); return new CertPathRep(type, getEncoded());
@ -300,6 +302,7 @@ public abstract class CertPath implements Serializable {
*/ */
protected static class CertPathRep implements Serializable { protected static class CertPathRep implements Serializable {
@java.io.Serial
private static final long serialVersionUID = 3015633072427920915L; private static final long serialVersionUID = 3015633072427920915L;
/** The Certificate type */ /** The Certificate type */
@ -327,6 +330,7 @@ public abstract class CertPath implements Serializable {
* @throws ObjectStreamException if a {@code CertPath} could not * @throws ObjectStreamException if a {@code CertPath} could not
* be constructed * be constructed
*/ */
@java.io.Serial
protected Object readResolve() throws ObjectStreamException { protected Object readResolve() throws ObjectStreamException {
try { try {
CertificateFactory cf = CertificateFactory.getInstance(type); CertificateFactory cf = CertificateFactory.getInstance(type);

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2000, 2013, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -50,6 +50,7 @@ import java.security.GeneralSecurityException;
*/ */
public class CertPathBuilderException extends GeneralSecurityException { public class CertPathBuilderException extends GeneralSecurityException {
@java.io.Serial
private static final long serialVersionUID = 5316471420178794402L; private static final long serialVersionUID = 5316471420178794402L;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2000, 2013, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -61,6 +61,7 @@ import java.security.GeneralSecurityException;
*/ */
public class CertPathValidatorException extends GeneralSecurityException { public class CertPathValidatorException extends GeneralSecurityException {
@java.io.Serial
private static final long serialVersionUID = -3083180014971893139L; private static final long serialVersionUID = -3083180014971893139L;
/** /**
@ -228,6 +229,7 @@ public class CertPathValidatorException extends GeneralSecurityException {
return this.reason; return this.reason;
} }
@java.io.Serial
private void readObject(ObjectInputStream stream) private void readObject(ObjectInputStream stream)
throws ClassNotFoundException, IOException { throws ClassNotFoundException, IOException {
stream.defaultReadObject(); stream.defaultReadObject();

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2000, 2013, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -50,6 +50,7 @@ import java.security.GeneralSecurityException;
*/ */
public class CertStoreException extends GeneralSecurityException { public class CertStoreException extends GeneralSecurityException {
@java.io.Serial
private static final long serialVersionUID = 2395296107471573245L; private static final long serialVersionUID = 2395296107471573245L;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2017, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -62,6 +62,7 @@ import sun.security.x509.X509CertImpl;
public abstract class Certificate implements java.io.Serializable { public abstract class Certificate implements java.io.Serializable {
@java.io.Serial
private static final long serialVersionUID = -3585440601605666277L; private static final long serialVersionUID = -3585440601605666277L;
// the certificate type // the certificate type
@ -240,6 +241,7 @@ public abstract class Certificate implements java.io.Serializable {
*/ */
protected static class CertificateRep implements java.io.Serializable { protected static class CertificateRep implements java.io.Serializable {
@java.io.Serial
private static final long serialVersionUID = -8563758940495660020L; private static final long serialVersionUID = -8563758940495660020L;
private String type; private String type;
@ -266,6 +268,7 @@ public abstract class Certificate implements java.io.Serializable {
* @throws java.io.ObjectStreamException if the Certificate * @throws java.io.ObjectStreamException if the Certificate
* could not be resolved * could not be resolved
*/ */
@java.io.Serial
protected Object readResolve() throws java.io.ObjectStreamException { protected Object readResolve() throws java.io.ObjectStreamException {
try { try {
CertificateFactory cf = CertificateFactory.getInstance(type); CertificateFactory cf = CertificateFactory.getInstance(type);
@ -290,6 +293,7 @@ public abstract class Certificate implements java.io.Serializable {
* this Certificate could not be created * this Certificate could not be created
* @since 1.3 * @since 1.3
*/ */
@java.io.Serial
protected Object writeReplace() throws java.io.ObjectStreamException { protected Object writeReplace() throws java.io.ObjectStreamException {
try { try {
return new CertificateRep(type, getEncoded()); return new CertificateRep(type, getEncoded());

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2013, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -34,6 +34,7 @@ package java.security.cert;
*/ */
public class CertificateEncodingException extends CertificateException { public class CertificateEncodingException extends CertificateException {
@java.io.Serial
private static final long serialVersionUID = 6219492851589449162L; private static final long serialVersionUID = 6219492851589449162L;
/** /**

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -36,6 +36,7 @@ import java.security.GeneralSecurityException;
*/ */
public class CertificateException extends GeneralSecurityException { public class CertificateException extends GeneralSecurityException {
@java.io.Serial
private static final long serialVersionUID = 3192535253797119798L; private static final long serialVersionUID = 3192535253797119798L;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2013, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -36,6 +36,7 @@ package java.security.cert;
*/ */
public class CertificateExpiredException extends CertificateException { public class CertificateExpiredException extends CertificateException {
@java.io.Serial
private static final long serialVersionUID = 9071001339691533771L; private static final long serialVersionUID = 9071001339691533771L;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2013, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -36,6 +36,7 @@ package java.security.cert;
*/ */
public class CertificateNotYetValidException extends CertificateException { public class CertificateNotYetValidException extends CertificateException {
@java.io.Serial
static final long serialVersionUID = 4355919900041064702L; static final long serialVersionUID = 4355919900041064702L;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2013, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -35,6 +35,7 @@ package java.security.cert;
*/ */
public class CertificateParsingException extends CertificateException { public class CertificateParsingException extends CertificateException {
@java.io.Serial
private static final long serialVersionUID = -7989222416793322029L; private static final long serialVersionUID = -7989222416793322029L;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -50,6 +50,7 @@ import sun.security.x509.InvalidityDateExtension;
*/ */
public class CertificateRevokedException extends CertificateException { public class CertificateRevokedException extends CertificateException {
@java.io.Serial
private static final long serialVersionUID = 7839996631571608627L; private static final long serialVersionUID = 7839996631571608627L;
/** /**
@ -191,6 +192,7 @@ public class CertificateRevokedException extends CertificateException {
* flag (boolean), the length of the encoded extension value byte array * flag (boolean), the length of the encoded extension value byte array
* (int), and the encoded extension value bytes. * (int), and the encoded extension value bytes.
*/ */
@java.io.Serial
private void writeObject(ObjectOutputStream oos) throws IOException { private void writeObject(ObjectOutputStream oos) throws IOException {
// Write out the non-transient fields // Write out the non-transient fields
// (revocationDate, reason, authority) // (revocationDate, reason, authority)
@ -217,6 +219,7 @@ public class CertificateRevokedException extends CertificateException {
/** /**
* Deserialize the {@code CertificateRevokedException} instance. * Deserialize the {@code CertificateRevokedException} instance.
*/ */
@java.io.Serial
private void readObject(ObjectInputStream ois) private void readObject(ObjectInputStream ois)
throws IOException, ClassNotFoundException { throws IOException, ClassNotFoundException {
// Read in the non-transient fields // Read in the non-transient fields

View file

@ -108,6 +108,7 @@ import sun.security.util.SignatureUtil;
public abstract class X509Certificate extends Certificate public abstract class X509Certificate extends Certificate
implements X509Extension { implements X509Extension {
@java.io.Serial
private static final long serialVersionUID = -2491127588187038216L; private static final long serialVersionUID = -2491127588187038216L;
private transient X500Principal subjectX500Principal, issuerX500Principal; private transient X500Principal subjectX500Principal, issuerX500Principal;

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -53,6 +53,7 @@ public interface DSAPrivateKey extends DSAKey, java.security.PrivateKey {
*/ */
@Deprecated @Deprecated
@SuppressWarnings("serial") @SuppressWarnings("serial")
@java.io.Serial
static final long serialVersionUID = 7776497482533790279L; static final long serialVersionUID = 7776497482533790279L;
/** /**

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -53,6 +53,7 @@ public interface DSAPublicKey extends DSAKey, java.security.PublicKey {
*/ */
@Deprecated @Deprecated
@SuppressWarnings("serial") @SuppressWarnings("serial")
@java.io.Serial
static final long serialVersionUID = 1234526332779022332L; static final long serialVersionUID = 1234526332779022332L;
/** /**

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -48,6 +48,7 @@ public interface ECPrivateKey extends PrivateKey, ECKey {
*/ */
@Deprecated @Deprecated
@SuppressWarnings("serial") @SuppressWarnings("serial")
@java.io.Serial
static final long serialVersionUID = -7896394956925609184L; static final long serialVersionUID = -7896394956925609184L;
/** /**

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -50,6 +50,7 @@ public interface ECPublicKey extends PublicKey, ECKey {
*/ */
@Deprecated @Deprecated
@SuppressWarnings("serial") @SuppressWarnings("serial")
@java.io.Serial
static final long serialVersionUID = -3314988629879632826L; static final long serialVersionUID = -3314988629879632826L;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -56,6 +56,7 @@ public interface RSAMultiPrimePrivateCrtKey extends RSAPrivateKey {
*/ */
@Deprecated @Deprecated
@SuppressWarnings("serial") @SuppressWarnings("serial")
@java.io.Serial
static final long serialVersionUID = 618058533534628008L; static final long serialVersionUID = 618058533534628008L;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1998, 2018, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -51,6 +51,7 @@ public interface RSAPrivateCrtKey extends RSAPrivateKey {
*/ */
@Deprecated @Deprecated
@SuppressWarnings("serial") @SuppressWarnings("serial")
@java.io.Serial
static final long serialVersionUID = -5682214253527700368L; static final long serialVersionUID = -5682214253527700368L;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1998, 2018, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -50,6 +50,7 @@ public interface RSAPrivateKey extends java.security.PrivateKey, RSAKey
*/ */
@Deprecated @Deprecated
@SuppressWarnings("serial") @SuppressWarnings("serial")
@java.io.Serial
static final long serialVersionUID = 5187144804936595022L; static final long serialVersionUID = 5187144804936595022L;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1998, 2018, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -47,6 +47,7 @@ public interface RSAPublicKey extends java.security.PublicKey, RSAKey
*/ */
@Deprecated @Deprecated
@SuppressWarnings("serial") @SuppressWarnings("serial")
@java.io.Serial
static final long serialVersionUID = -8727434096241101194L; static final long serialVersionUID = -8727434096241101194L;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2013, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -40,6 +40,7 @@ import java.security.GeneralSecurityException;
public class InvalidKeySpecException extends GeneralSecurityException { public class InvalidKeySpecException extends GeneralSecurityException {
@java.io.Serial
private static final long serialVersionUID = 3546139293998810778L; private static final long serialVersionUID = 3546139293998810778L;
/** /**

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -42,6 +42,7 @@ import java.security.GeneralSecurityException;
public class InvalidParameterSpecException extends GeneralSecurityException { public class InvalidParameterSpecException extends GeneralSecurityException {
@java.io.Serial
private static final long serialVersionUID = -970468769593399342L; private static final long serialVersionUID = -970468769593399342L;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -34,6 +34,7 @@ package javax.crypto;
*/ */
public class AEADBadTagException extends BadPaddingException { public class AEADBadTagException extends BadPaddingException {
@java.io.Serial
private static final long serialVersionUID = -488059093241685509L; private static final long serialVersionUID = -488059093241685509L;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2007, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -37,6 +37,7 @@ import java.security.GeneralSecurityException;
public class BadPaddingException extends GeneralSecurityException { public class BadPaddingException extends GeneralSecurityException {
@java.io.Serial
private static final long serialVersionUID = -5315033893984728443L; private static final long serialVersionUID = -5315033893984728443L;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1999, 2012, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -43,6 +43,7 @@ import java.util.Vector;
final class CryptoAllPermission extends CryptoPermission { final class CryptoAllPermission extends CryptoPermission {
@java.io.Serial
private static final long serialVersionUID = -5066513634293192112L; private static final long serialVersionUID = -5066513634293192112L;
// This class is similar to java.security.AllPermission. // This class is similar to java.security.AllPermission.
@ -116,6 +117,7 @@ final class CryptoAllPermissionCollection extends PermissionCollection
implements java.io.Serializable implements java.io.Serializable
{ {
@java.io.Serial
private static final long serialVersionUID = 7450076868380144072L; private static final long serialVersionUID = 7450076868380144072L;
// true if a CryptoAllPermission has been added // true if a CryptoAllPermission has been added

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1999, 2017, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -49,6 +49,7 @@ import javax.crypto.spec.*;
*/ */
class CryptoPermission extends java.security.Permission { class CryptoPermission extends java.security.Permission {
@java.io.Serial
private static final long serialVersionUID = 8987399626114087514L; private static final long serialVersionUID = 8987399626114087514L;
private String alg; private String alg;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1999, 2016, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -63,11 +63,13 @@ import java.io.IOException;
final class CryptoPermissions extends PermissionCollection final class CryptoPermissions extends PermissionCollection
implements Serializable { implements Serializable {
@java.io.Serial
private static final long serialVersionUID = 4946547168093391015L; private static final long serialVersionUID = 4946547168093391015L;
/** /**
* @serialField perms java.util.Hashtable * @serialField perms java.util.Hashtable
*/ */
@java.io.Serial
private static final ObjectStreamField[] serialPersistentFields = { private static final ObjectStreamField[] serialPersistentFields = {
new ObjectStreamField("perms", Hashtable.class), new ObjectStreamField("perms", Hashtable.class),
}; };
@ -436,6 +438,7 @@ implements Serializable {
return pc; return pc;
} }
@java.io.Serial
private void readObject(ObjectInputStream s) private void readObject(ObjectInputStream s)
throws IOException, ClassNotFoundException { throws IOException, ClassNotFoundException {
ObjectInputStream.GetField fields = s.readFields(); ObjectInputStream.GetField fields = s.readFields();
@ -450,6 +453,7 @@ implements Serializable {
} }
} }
@java.io.Serial
private void writeObject(ObjectOutputStream s) throws IOException { private void writeObject(ObjectOutputStream s) throws IOException {
Hashtable<String,PermissionCollection> permTable = Hashtable<String,PermissionCollection> permTable =
new Hashtable<>(perms); new Hashtable<>(perms);

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1999, 2017, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -684,6 +684,7 @@ final class CryptoPolicyParser {
static final class ParsingException extends GeneralSecurityException { static final class ParsingException extends GeneralSecurityException {
@java.io.Serial
private static final long serialVersionUID = 7147241245566588374L; private static final long serialVersionUID = 7147241245566588374L;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1999, 2007, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -35,6 +35,7 @@ import java.security.GeneralSecurityException;
public class ExemptionMechanismException extends GeneralSecurityException { public class ExemptionMechanismException extends GeneralSecurityException {
@java.io.Serial
private static final long serialVersionUID = 1572699429277957109L; private static final long serialVersionUID = 1572699429277957109L;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2007, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -37,6 +37,7 @@ package javax.crypto;
public class IllegalBlockSizeException public class IllegalBlockSizeException
extends java.security.GeneralSecurityException { extends java.security.GeneralSecurityException {
@java.io.Serial
private static final long serialVersionUID = -1965144811953540392L; private static final long serialVersionUID = -1965144811953540392L;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2007, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -38,6 +38,7 @@ import java.security.GeneralSecurityException;
public class NoSuchPaddingException extends GeneralSecurityException { public class NoSuchPaddingException extends GeneralSecurityException {
@java.io.Serial
private static final long serialVersionUID = -4572885201200175466L; private static final long serialVersionUID = -4572885201200175466L;
/** /**

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -93,6 +93,7 @@ import java.security.NoSuchProviderException;
public class SealedObject implements Serializable { public class SealedObject implements Serializable {
@java.io.Serial
static final long serialVersionUID = 4482838265551344752L; static final long serialVersionUID = 4482838265551344752L;
/** /**
@ -423,6 +424,7 @@ public class SealedObject implements Serializable {
* @param s the object input stream. * @param s the object input stream.
* @exception NullPointerException if s is null. * @exception NullPointerException if s is null.
*/ */
@java.io.Serial
private void readObject(java.io.ObjectInputStream s) private void readObject(java.io.ObjectInputStream s)
throws java.io.IOException, ClassNotFoundException throws java.io.IOException, ClassNotFoundException
{ {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2007, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -38,6 +38,7 @@ import java.security.GeneralSecurityException;
public class ShortBufferException extends GeneralSecurityException { public class ShortBufferException extends GeneralSecurityException {
@java.io.Serial
private static final long serialVersionUID = 8427718640832943747L; private static final long serialVersionUID = 8427718640832943747L;
/** /**

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -47,6 +47,7 @@ public interface DHPrivateKey extends DHKey, java.security.PrivateKey {
*/ */
@Deprecated @Deprecated
@SuppressWarnings("serial") @SuppressWarnings("serial")
@java.io.Serial
static final long serialVersionUID = 2211791113380396553L; static final long serialVersionUID = 2211791113380396553L;
/** /**

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -47,6 +47,7 @@ public interface DHPublicKey extends DHKey, java.security.PublicKey {
*/ */
@Deprecated @Deprecated
@SuppressWarnings("serial") @SuppressWarnings("serial")
@java.io.Serial
static final long serialVersionUID = -6628103563352519193L; static final long serialVersionUID = -6628103563352519193L;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -47,6 +47,7 @@ public interface PBEKey extends javax.crypto.SecretKey {
*/ */
@Deprecated @Deprecated
@SuppressWarnings("serial") @SuppressWarnings("serial")
@java.io.Serial
static final long serialVersionUID = -1430015993304333921L; static final long serialVersionUID = -1430015993304333921L;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1998, 2017, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -49,6 +49,7 @@ import javax.crypto.SecretKey;
*/ */
public class SecretKeySpec implements KeySpec, SecretKey { public class SecretKeySpec implements KeySpec, SecretKey {
@java.io.Serial
private static final long serialVersionUID = 6577238317307289933L; private static final long serialVersionUID = 6577238317307289933L;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1998, 2018, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -129,6 +129,7 @@ package javax.security.auth;
public final class AuthPermission extends public final class AuthPermission extends
java.security.BasicPermission { java.security.BasicPermission {
@java.io.Serial
private static final long serialVersionUID = 5806031445061587174L; private static final long serialVersionUID = 5806031445061587174L;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1999, 2015, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -36,6 +36,7 @@ package javax.security.auth;
*/ */
public class DestroyFailedException extends Exception { public class DestroyFailedException extends Exception {
@java.io.Serial
private static final long serialVersionUID = -7790152857282749162L; private static final long serialVersionUID = -7790152857282749162L;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1999, 2015, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -104,6 +104,7 @@ import sun.security.util.ResourcesMgr;
*/ */
public final class PrivateCredentialPermission extends Permission { public final class PrivateCredentialPermission extends Permission {
@java.io.Serial
private static final long serialVersionUID = 5284372143517237068L; private static final long serialVersionUID = 5284372143517237068L;
private static final CredOwner[] EMPTY_PRINCIPALS = new CredOwner[0]; private static final CredOwner[] EMPTY_PRINCIPALS = new CredOwner[0];
@ -474,6 +475,7 @@ public final class PrivateCredentialPermission extends Permission {
/** /**
* Reads this object from a stream (i.e., deserializes it) * Reads this object from a stream (i.e., deserializes it)
*/ */
@java.io.Serial
private void readObject(java.io.ObjectInputStream s) throws private void readObject(java.io.ObjectInputStream s) throws
java.io.IOException, java.io.IOException,
ClassNotFoundException { ClassNotFoundException {
@ -500,6 +502,7 @@ public final class PrivateCredentialPermission extends Permission {
*/ */
static class CredOwner implements java.io.Serializable { static class CredOwner implements java.io.Serializable {
@java.io.Serial
private static final long serialVersionUID = -5607449830436408266L; private static final long serialVersionUID = -5607449830436408266L;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1999, 2015, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -36,6 +36,7 @@ package javax.security.auth;
*/ */
public class RefreshFailedException extends Exception { public class RefreshFailedException extends Exception {
@java.io.Serial
private static final long serialVersionUID = 5058444488565265840L; private static final long serialVersionUID = 5058444488565265840L;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1998, 2015, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -100,6 +100,7 @@ import sun.security.util.ResourcesMgr;
*/ */
public final class Subject implements java.io.Serializable { public final class Subject implements java.io.Serializable {
@java.io.Serial
private static final long serialVersionUID = -8308522755600156056L; private static final long serialVersionUID = -8308522755600156056L;
/** /**
@ -946,6 +947,7 @@ public final class Subject implements java.io.Serializable {
/** /**
* Writes this object out to a stream (i.e., serializes it). * Writes this object out to a stream (i.e., serializes it).
*/ */
@java.io.Serial
private void writeObject(java.io.ObjectOutputStream oos) private void writeObject(java.io.ObjectOutputStream oos)
throws java.io.IOException { throws java.io.IOException {
synchronized(principals) { synchronized(principals) {
@ -957,6 +959,7 @@ public final class Subject implements java.io.Serializable {
* Reads this object from a stream (i.e., deserializes it) * Reads this object from a stream (i.e., deserializes it)
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@java.io.Serial
private void readObject(java.io.ObjectInputStream s) private void readObject(java.io.ObjectInputStream s)
throws java.io.IOException, ClassNotFoundException { throws java.io.IOException, ClassNotFoundException {
@ -1027,12 +1030,14 @@ public final class Subject implements java.io.Serializable {
private static class SecureSet<E> private static class SecureSet<E>
implements Set<E>, java.io.Serializable { implements Set<E>, java.io.Serializable {
@java.io.Serial
private static final long serialVersionUID = 7911754171111800359L; private static final long serialVersionUID = 7911754171111800359L;
/** /**
* @serialField this$0 Subject The outer Subject instance. * @serialField this$0 Subject The outer Subject instance.
* @serialField elements LinkedList The elements in this set. * @serialField elements LinkedList The elements in this set.
*/ */
@java.io.Serial
private static final ObjectStreamField[] serialPersistentFields = { private static final ObjectStreamField[] serialPersistentFields = {
new ObjectStreamField("this$0", Subject.class), new ObjectStreamField("this$0", Subject.class),
new ObjectStreamField("elements", LinkedList.class), new ObjectStreamField("elements", LinkedList.class),
@ -1408,6 +1413,7 @@ public final class Subject implements java.io.Serializable {
* in the set. If the security check passes, * in the set. If the security check passes,
* the set is serialized. * the set is serialized.
*/ */
@java.io.Serial
private void writeObject(java.io.ObjectOutputStream oos) private void writeObject(java.io.ObjectOutputStream oos)
throws java.io.IOException { throws java.io.IOException {
@ -1426,6 +1432,7 @@ public final class Subject implements java.io.Serializable {
} }
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@java.io.Serial
private void readObject(ObjectInputStream ois) private void readObject(ObjectInputStream ois)
throws IOException, ClassNotFoundException throws IOException, ClassNotFoundException
{ {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1999, 2015, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -36,6 +36,7 @@ package javax.security.auth.callback;
*/ */
public class ChoiceCallback implements Callback, java.io.Serializable { public class ChoiceCallback implements Callback, java.io.Serializable {
@java.io.Serial
private static final long serialVersionUID = -3975664071579892167L; private static final long serialVersionUID = -3975664071579892167L;
/** /**

View file

@ -36,6 +36,7 @@ package javax.security.auth.callback;
*/ */
public class ConfirmationCallback implements Callback, java.io.Serializable { public class ConfirmationCallback implements Callback, java.io.Serializable {
@java.io.Serial
private static final long serialVersionUID = -9095656433782481624L; private static final long serialVersionUID = -9095656433782481624L;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1999, 2015, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -38,6 +38,7 @@ import java.util.Locale;
*/ */
public class LanguageCallback implements Callback, java.io.Serializable { public class LanguageCallback implements Callback, java.io.Serializable {
@java.io.Serial
private static final long serialVersionUID = 2019050433478903213L; private static final long serialVersionUID = 2019050433478903213L;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1999, 2015, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -35,6 +35,7 @@ package javax.security.auth.callback;
*/ */
public class NameCallback implements Callback, java.io.Serializable { public class NameCallback implements Callback, java.io.Serializable {
@java.io.Serial
private static final long serialVersionUID = 3770938795909392253L; private static final long serialVersionUID = 3770938795909392253L;
/** /**

Some files were not shown because too many files have changed in this diff Show more