mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8229999: Apply java.io.Serial annotations to security types in java.base
Reviewed-by: rriggs, mullan
This commit is contained in:
parent
470d32df73
commit
6d4ef5aaf3
158 changed files with 377 additions and 141 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -76,6 +76,7 @@ public final
|
|||
class AlgIdDSA extends AlgorithmId implements DSAParams
|
||||
{
|
||||
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 3437177836797504046L;
|
||||
|
||||
/*
|
||||
|
|
|
@ -63,6 +63,7 @@ import sun.security.util.*;
|
|||
public class AlgorithmId implements Serializable, DerEncoder {
|
||||
|
||||
/** use serialVersionUID from JDK 1.1. for interoperability */
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 7205873507486557157L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -38,6 +38,7 @@ import java.util.Enumeration;
|
|||
*/
|
||||
public class AttributeNameEnumeration extends Vector<String> {
|
||||
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -6067440240757099134L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -39,6 +39,7 @@ package sun.security.x509;
|
|||
@Deprecated
|
||||
public class CertException extends SecurityException {
|
||||
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 6930793039696446142L;
|
||||
|
||||
// Zero is reserved.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -35,6 +35,7 @@ package sun.security.x509;
|
|||
@Deprecated
|
||||
class CertParseError extends CertException
|
||||
{
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -4559645519017017804L;
|
||||
|
||||
CertParseError (String where)
|
||||
|
|
|
@ -72,6 +72,7 @@ import sun.security.provider.X509Factory;
|
|||
*/
|
||||
public class X509CertImpl extends X509Certificate implements DerEncoder {
|
||||
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -3457612960190864406L;
|
||||
|
||||
private static final char DOT = '.';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -59,6 +59,7 @@ import sun.security.util.*;
|
|||
public class X509Key implements PublicKey {
|
||||
|
||||
/** use serialVersionUID from JDK 1.1. for interoperability */
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -5359250853002055002L;
|
||||
|
||||
/* The algorithm information (name, parameters, etc). */
|
||||
|
@ -405,6 +406,7 @@ public class X509Key implements PublicKey {
|
|||
* Serialization write ... X.509 keys serialize as
|
||||
* themselves, and they're parsed when they get read back.
|
||||
*/
|
||||
@java.io.Serial
|
||||
private void writeObject(ObjectOutputStream stream) throws IOException {
|
||||
stream.write(getEncoded());
|
||||
}
|
||||
|
@ -413,6 +415,7 @@ public class X509Key implements PublicKey {
|
|||
* Serialization read ... X.509 keys serialize as
|
||||
* themselves, and they're parsed when they get read back.
|
||||
*/
|
||||
@java.io.Serial
|
||||
private void readObject(ObjectInputStream stream) throws IOException {
|
||||
try {
|
||||
decode(stream);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue