mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8229997: Apply java.io.Serial annotations in java.base
Reviewed-by: alanb, rriggs
This commit is contained in:
parent
6d064a747e
commit
9d764ee48e
315 changed files with 880 additions and 254 deletions
|
@ -195,6 +195,7 @@ public final class FilePermission extends Permission implements Serializable {
|
|||
// return sb.toString();
|
||||
// }
|
||||
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 7930732926638008763L;
|
||||
|
||||
/**
|
||||
|
@ -1040,6 +1041,7 @@ public final class FilePermission extends Permission implements Serializable {
|
|||
* to a stream. The actions are serialized, and the superclass
|
||||
* takes care of the name.
|
||||
*/
|
||||
@java.io.Serial
|
||||
private void writeObject(ObjectOutputStream s)
|
||||
throws IOException
|
||||
{
|
||||
|
@ -1054,6 +1056,7 @@ public final class FilePermission extends Permission implements Serializable {
|
|||
* readObject is called to restore the state of the FilePermission from
|
||||
* a stream.
|
||||
*/
|
||||
@java.io.Serial
|
||||
private void readObject(ObjectInputStream s)
|
||||
throws IOException, ClassNotFoundException
|
||||
{
|
||||
|
@ -1210,6 +1213,7 @@ final class FilePermissionCollection extends PermissionCollection
|
|||
return perms.elements();
|
||||
}
|
||||
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 2202956749081564585L;
|
||||
|
||||
// Need to maintain serialization interoperability with earlier releases,
|
||||
|
@ -1220,6 +1224,7 @@ final class FilePermissionCollection extends PermissionCollection
|
|||
* @serialField permissions java.util.Vector
|
||||
* A list of FilePermission objects.
|
||||
*/
|
||||
@java.io.Serial
|
||||
private static final ObjectStreamField[] serialPersistentFields = {
|
||||
new ObjectStreamField("permissions", Vector.class),
|
||||
};
|
||||
|
@ -1231,6 +1236,7 @@ final class FilePermissionCollection extends PermissionCollection
|
|||
* Writes the contents of the perms field out as a Vector for
|
||||
* serialization compatibility with earlier releases.
|
||||
*/
|
||||
@java.io.Serial
|
||||
private void writeObject(ObjectOutputStream out) throws IOException {
|
||||
// Don't call out.defaultWriteObject()
|
||||
|
||||
|
@ -1245,6 +1251,7 @@ final class FilePermissionCollection extends PermissionCollection
|
|||
/*
|
||||
* Reads in a Vector of FilePermissions and saves them in the perms field.
|
||||
*/
|
||||
@java.io.Serial
|
||||
private void readObject(ObjectInputStream in)
|
||||
throws IOException, ClassNotFoundException
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue