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) 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,