< prev index next >
src/java.base/share/classes/java/io/FilePermission.java
Print this page
@@ -193,10 +193,11 @@
// }
// sb.append("***\n");
// return sb.toString();
// }
+ @java.io.Serial
private static final long serialVersionUID = 7930732926638008763L;
/**
* Use the platform's default file system to avoid recursive initialization
* issues when the VM is configured to use a custom file system provider.
@@ -1038,10 +1039,11 @@
/**
* WriteObject is called to save the state of the FilePermission
* 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
{
// Write out the actions. The superclass takes care of the name
// call getActions to make sure actions field is initialized
@@ -1052,10 +1054,11 @@
/**
* readObject is called to restore the state of the FilePermission from
* a stream.
*/
+ @java.io.Serial
private void readObject(ObjectInputStream s)
throws IOException, ClassNotFoundException
{
// Read in the actions, then restore everything else by calling init.
s.defaultReadObject();
@@ -1208,20 +1211,22 @@
@Override
public Enumeration<Permission> elements() {
return perms.elements();
}
+ @java.io.Serial
private static final long serialVersionUID = 2202956749081564585L;
// Need to maintain serialization interoperability with earlier releases,
// which had the serializable field:
// private Vector permissions;
/**
* @serialField permissions java.util.Vector
* A list of FilePermission objects.
*/
+ @java.io.Serial
private static final ObjectStreamField[] serialPersistentFields = {
new ObjectStreamField("permissions", Vector.class),
};
/**
@@ -1229,10 +1234,11 @@
*/
/*
* 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()
// Write out Vector
Vector<Permission> permissions = new Vector<>(perms.values());
@@ -1243,10 +1249,11 @@
}
/*
* Reads in a Vector of FilePermissions and saves them in the perms field.
*/
+ @java.io.Serial
private void readObject(ObjectInputStream in)
throws IOException, ClassNotFoundException
{
// Don't call defaultReadObject()
< prev index next >