src/java.base/share/classes/sun/security/util/LazyCodeSourcePermissionCollection.java
equal
deleted
inserted
replaced
42 * the collection is serialized. |
42 * the collection is serialized. |
43 */ |
43 */ |
44 public final class LazyCodeSourcePermissionCollection |
44 public final class LazyCodeSourcePermissionCollection |
45 extends PermissionCollection |
45 extends PermissionCollection |
46 { |
46 { |
|
47 @java.io.Serial |
47 private static final long serialVersionUID = -6727011328946861783L; |
48 private static final long serialVersionUID = -6727011328946861783L; |
48 private final PermissionCollection perms; |
49 private final PermissionCollection perms; |
49 private final CodeSource cs; |
50 private final CodeSource cs; |
50 private volatile boolean permissionAdded; |
51 private volatile boolean permissionAdded; |
51 |
52 |
117 |
118 |
118 /** |
119 /** |
119 * On serialization, initialize and replace with the underlying |
120 * On serialization, initialize and replace with the underlying |
120 * permissions. This removes the laziness on deserialization. |
121 * permissions. This removes the laziness on deserialization. |
121 */ |
122 */ |
|
123 @java.io.Serial |
122 private Object writeReplace() { |
124 private Object writeReplace() { |
123 ensureAdded(); |
125 ensureAdded(); |
124 return perms; |
126 return perms; |
125 } |
127 } |
126 } |
128 } |