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) 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.
*
* 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 {
@java.io.Serial
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.
*
* 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 {
@java.io.Serial
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.
*
* 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 {
@java.io.Serial
private static final long serialVersionUID = -5066513634293192112L;
// This class is similar to java.security.AllPermission.
@ -116,6 +117,7 @@ final class CryptoAllPermissionCollection extends PermissionCollection
implements java.io.Serializable
{
@java.io.Serial
private static final long serialVersionUID = 7450076868380144072L;
// 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.
*
* 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 {
@java.io.Serial
private static final long serialVersionUID = 8987399626114087514L;
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.
*
* 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
implements Serializable {
@java.io.Serial
private static final long serialVersionUID = 4946547168093391015L;
/**
* @serialField perms java.util.Hashtable
*/
@java.io.Serial
private static final ObjectStreamField[] serialPersistentFields = {
new ObjectStreamField("perms", Hashtable.class),
};
@ -436,6 +438,7 @@ implements Serializable {
return pc;
}
@java.io.Serial
private void readObject(ObjectInputStream s)
throws IOException, ClassNotFoundException {
ObjectInputStream.GetField fields = s.readFields();
@ -450,6 +453,7 @@ implements Serializable {
}
}
@java.io.Serial
private void writeObject(ObjectOutputStream s) throws IOException {
Hashtable<String,PermissionCollection> permTable =
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.
*
* 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 {
@java.io.Serial
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.
*
* 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 {
@java.io.Serial
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.
*
* This code is free software; you can redistribute it and/or modify it
@ -37,6 +37,7 @@ package javax.crypto;
public class IllegalBlockSizeException
extends java.security.GeneralSecurityException {
@java.io.Serial
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.
*
* 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 {
@java.io.Serial
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.
*
* 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 {
@java.io.Serial
static final long serialVersionUID = 4482838265551344752L;
/**
@ -423,6 +424,7 @@ public class SealedObject implements Serializable {
* @param s the object input stream.
* @exception NullPointerException if s is null.
*/
@java.io.Serial
private void readObject(java.io.ObjectInputStream s)
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.
*
* 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 {
@java.io.Serial
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.
*
* 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
@SuppressWarnings("serial")
@java.io.Serial
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.
*
* 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
@SuppressWarnings("serial")
@java.io.Serial
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.
*
* 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
@SuppressWarnings("serial")
@java.io.Serial
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.
*
* 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 {
@java.io.Serial
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.
*
* 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
java.security.BasicPermission {
@java.io.Serial
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.
*
* 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 {
@java.io.Serial
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.
*
* 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 {
@java.io.Serial
private static final long serialVersionUID = 5284372143517237068L;
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)
*/
@java.io.Serial
private void readObject(java.io.ObjectInputStream s) throws
java.io.IOException,
ClassNotFoundException {
@ -500,6 +502,7 @@ public final class PrivateCredentialPermission extends Permission {
*/
static class CredOwner implements java.io.Serializable {
@java.io.Serial
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.
*
* 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 {
@java.io.Serial
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.
*
* 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 {
@java.io.Serial
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).
*/
@java.io.Serial
private void writeObject(java.io.ObjectOutputStream oos)
throws java.io.IOException {
synchronized(principals) {
@ -957,6 +959,7 @@ public final class Subject implements java.io.Serializable {
* Reads this object from a stream (i.e., deserializes it)
*/
@SuppressWarnings("unchecked")
@java.io.Serial
private void readObject(java.io.ObjectInputStream s)
throws java.io.IOException, ClassNotFoundException {
@ -1027,12 +1030,14 @@ public final class Subject implements java.io.Serializable {
private static class SecureSet<E>
implements Set<E>, java.io.Serializable {
@java.io.Serial
private static final long serialVersionUID = 7911754171111800359L;
/**
* @serialField this$0 Subject The outer Subject instance.
* @serialField elements LinkedList The elements in this set.
*/
@java.io.Serial
private static final ObjectStreamField[] serialPersistentFields = {
new ObjectStreamField("this$0", Subject.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,
* the set is serialized.
*/
@java.io.Serial
private void writeObject(java.io.ObjectOutputStream oos)
throws java.io.IOException {
@ -1426,6 +1432,7 @@ public final class Subject implements java.io.Serializable {
}
@SuppressWarnings("unchecked")
@java.io.Serial
private void readObject(ObjectInputStream ois)
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.
*
* 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 {
@java.io.Serial
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 {
@java.io.Serial
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.
*
* 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 {
@java.io.Serial
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.
*
* 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 {
@java.io.Serial
private static final long serialVersionUID = 3770938795909392253L;
/**

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.
*
* This code is free software; you can redistribute it and/or modify it
@ -35,6 +35,7 @@ package javax.security.auth.callback;
*/
public class PasswordCallback implements Callback, java.io.Serializable {
@java.io.Serial
private static final long serialVersionUID = 2267422647454909926L;
/**

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.
*
* This code is free software; you can redistribute it and/or modify it
@ -36,6 +36,7 @@ package javax.security.auth.callback;
*/
public class TextInputCallback implements Callback, java.io.Serializable {
@java.io.Serial
private static final long serialVersionUID = -8064222478852811804L;
/**

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.
*
* This code is free software; you can redistribute it and/or modify it
@ -36,6 +36,7 @@ package javax.security.auth.callback;
*/
public class TextOutputCallback implements Callback, java.io.Serializable {
@java.io.Serial
private static final long serialVersionUID = 1689502495511663102L;
/** Information message. */

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.
*
* This code is free software; you can redistribute it and/or modify it
@ -33,6 +33,7 @@ package javax.security.auth.callback;
*/
public class UnsupportedCallbackException extends Exception {
@java.io.Serial
private static final long serialVersionUID = -6873556327655666839L;
/**

View file

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

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.
*
* This code is free software; you can redistribute it and/or modify it
@ -39,6 +39,7 @@ package javax.security.auth.login;
*/
public class AccountExpiredException extends AccountException {
@java.io.Serial
private static final long serialVersionUID = -6064064890162661560L;
/**

View file

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

View file

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

View file

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

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.
*
* This code is free software; you can redistribute it and/or modify it
@ -41,6 +41,7 @@ package javax.security.auth.login;
*/
public class CredentialExpiredException extends CredentialException {
@java.io.Serial
private static final long serialVersionUID = -5344739593859737937L;
/**

View file

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

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.
*
* This code is free software; you can redistribute it and/or modify it
@ -36,6 +36,7 @@ package javax.security.auth.login;
*/
public class FailedLoginException extends LoginException {
@java.io.Serial
private static final long serialVersionUID = 802556922354616286L;
/**

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.
*
* This code is free software; you can redistribute it and/or modify it
@ -34,6 +34,7 @@ package javax.security.auth.login;
public class LoginException extends java.security.GeneralSecurityException {
@java.io.Serial
private static final long serialVersionUID = -4679091624035232488L;
/**

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -63,6 +63,7 @@ import sun.security.util.*;
*/
public final class X500Principal implements Principal, java.io.Serializable {
@java.io.Serial
private static final long serialVersionUID = -500463348111345721L;
/**
@ -494,6 +495,7 @@ public final class X500Principal implements Principal, java.io.Serializable {
* by writing out its DER-encoded form
* (the value of {@code getEncoded} is serialized).
*/
@java.io.Serial
private void writeObject(java.io.ObjectOutputStream s)
throws IOException {
s.writeObject(thisX500Name.getEncodedInternal());
@ -502,6 +504,7 @@ public final class X500Principal implements Principal, java.io.Serializable {
/**
* Reads this object from a stream (i.e., deserializes it).
*/
@java.io.Serial
private void readObject(java.io.ObjectInputStream s)
throws java.io.IOException,
java.io.NotActiveException,

View file

@ -44,6 +44,7 @@ package javax.security.cert;
@Deprecated(since="9", forRemoval=true)
public class CertificateEncodingException extends CertificateException {
@java.io.Serial
private static final long serialVersionUID = -8187642723048403470L;
/**
* Constructs a CertificateEncodingException with no detail message. A

View file

@ -43,6 +43,7 @@ package javax.security.cert;
@Deprecated(since="9", forRemoval=true)
public class CertificateException extends Exception {
@java.io.Serial
private static final long serialVersionUID = -5757213374030785290L;
/**
* Constructs a certificate exception with no detail message. A detail

View file

@ -46,6 +46,7 @@ package javax.security.cert;
@Deprecated(since="9", forRemoval=true)
public class CertificateExpiredException extends CertificateException {
@java.io.Serial
private static final long serialVersionUID = 5091601212177261883L;
/**
* Constructs a CertificateExpiredException with no detail message. A

View file

@ -46,6 +46,7 @@ package javax.security.cert;
@Deprecated(since="9", forRemoval=true)
public class CertificateNotYetValidException extends CertificateException {
@java.io.Serial
private static final long serialVersionUID = -8976172474266822818L;
/**
* Constructs a CertificateNotYetValidException with no detail message. A

View file

@ -45,6 +45,7 @@ package javax.security.cert;
@Deprecated(since="9", forRemoval=true)
public class CertificateParsingException extends CertificateException {
@java.io.Serial
private static final long serialVersionUID = -8449352422951136229L;
/**