mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +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) 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.
|
||||
*
|
||||
* 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 {
|
||||
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 6068470306649138683L;
|
||||
|
||||
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
|
||||
* representing this certification path could not be created
|
||||
*/
|
||||
@java.io.Serial
|
||||
protected Object writeReplace() throws ObjectStreamException {
|
||||
try {
|
||||
return new CertPathRep(type, getEncoded());
|
||||
|
@ -300,6 +302,7 @@ public abstract class CertPath implements Serializable {
|
|||
*/
|
||||
protected static class CertPathRep implements Serializable {
|
||||
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 3015633072427920915L;
|
||||
|
||||
/** The Certificate type */
|
||||
|
@ -327,6 +330,7 @@ public abstract class CertPath implements Serializable {
|
|||
* @throws ObjectStreamException if a {@code CertPath} could not
|
||||
* be constructed
|
||||
*/
|
||||
@java.io.Serial
|
||||
protected Object readResolve() throws ObjectStreamException {
|
||||
try {
|
||||
CertificateFactory cf = CertificateFactory.getInstance(type);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue