< prev index next >
src/java.base/share/classes/java/io/FilePermission.java
Print this page
*** 193,202 ****
--- 193,203 ----
// }
// 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,1047 ****
--- 1039,1049 ----
/**
* 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,1061 ****
--- 1054,1064 ----
/**
* 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,1227 ****
--- 1211,1232 ----
@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,1238 ****
--- 1234,1244 ----
*/
/*
* 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,1252 ****
--- 1249,1259 ----
}
/*
* 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 >