8263105: security-libs doclint cleanup

Reviewed-by: iris, darcy, dfuchs, mullan
This commit is contained in:
Bradford Wetmore 2021-03-11 00:26:26 +00:00
parent 6971c23a3a
commit 32cbd193d9
35 changed files with 294 additions and 79 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2021, 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
@ -96,23 +96,28 @@ public class PrivilegedActionException extends Exception {
/**
* Serializable fields for UndeclaredThrowableException.
* The exception thrown by the privileged computation that resulted
* in this {@code PrivilegedActionException}.
*
* @serialField undeclaredThrowable Throwable
* @serialField exception Exception the thrown Exception
*/
@java.io.Serial
private static final ObjectStreamField[] serialPersistentFields = {
new ObjectStreamField("exception", Exception.class)
};
/*
/**
* Reconstitutes the PrivilegedActionException instance from a stream
* and initialize the cause properly when deserializing from an older
* version.
*
* The getException and getCause method returns the private "exception"
* <p>The getException and getCause method returns the private "exception"
* field in the older implementation and PrivilegedActionException::cause
* was set to null.
*
* @param s the {@code ObjectInputStream} from which data is read
* @throws IOException if an I/O error occurs
* @throws ClassNotFoundException if a serialized class cannot be loaded
*/
@java.io.Serial
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException {
@ -123,9 +128,12 @@ public class PrivilegedActionException extends Exception {
}
}
/*
/**
* To maintain compatibility with older implementation, write a serial
* "exception" field with the cause as the value.
*
* @param out the {@code ObjectOutputStream} to which data is written
* @throws IOException if an I/O error occurs
*/
@java.io.Serial
private void writeObject(ObjectOutputStream out) throws IOException {