< prev index next >
src/java.base/share/classes/java/util/BitSet.java
Print this page
*** 81,90 ****
--- 81,91 ----
*
* The bits in this BitSet. The ith bit is stored in bits[i/64] at
* bit position i % 64 (where bit position 0 refers to the least
* significant bit and 63 refers to the most significant bit).
*/
+ @java.io.Serial
private static final ObjectStreamField[] serialPersistentFields = {
new ObjectStreamField("bits", long[].class),
};
/**
*** 102,111 ****
--- 103,113 ----
* the user knows what he's doing and try harder to preserve it.
*/
private transient boolean sizeIsSticky = false;
/* use serialVersionUID from JDK 1.0.2 for interoperability */
+ @java.io.Serial
private static final long serialVersionUID = 7997698588986878753L;
/**
* Given a bit index, return word index containing it.
*/
*** 1122,1131 ****
--- 1124,1134 ----
/**
* Save the state of the {@code BitSet} instance to a stream (i.e.,
* serialize it).
*/
+ @java.io.Serial
private void writeObject(ObjectOutputStream s)
throws IOException {
checkInvariants();
*** 1139,1148 ****
--- 1142,1152 ----
/**
* Reconstitute the {@code BitSet} instance from a stream (i.e.,
* deserialize it).
*/
+ @java.io.Serial
private void readObject(ObjectInputStream s)
throws IOException, ClassNotFoundException {
ObjectInputStream.GetField fields = s.readFields();
words = (long[]) fields.get("bits", null);
< prev index next >