< prev index next >
src/java.base/share/classes/java/util/Vector.java
Print this page
*** 122,131 ****
--- 122,132 ----
* @serial
*/
protected int capacityIncrement;
/** use serialVersionUID from JDK 1.0.2 for interoperability */
+ @java.io.Serial
private static final long serialVersionUID = -2767605614048989439L;
/**
* Constructs an empty vector with the specified initial capacity and
* capacity increment.
*** 1147,1156 ****
--- 1148,1158 ----
* @param in the stream
* @throws java.io.IOException if an I/O error occurs
* @throws ClassNotFoundException if the stream contains data
* of a non-existing class
*/
+ @java.io.Serial
private void readObject(ObjectInputStream in)
throws IOException, ClassNotFoundException {
ObjectInputStream.GetField gfields = in.readFields();
int count = gfields.get("elementCount", 0);
Object[] data = (Object[])gfields.get("elementData", null);
*** 1168,1177 ****
--- 1170,1180 ----
* of the serialized data.
*
* @param s the stream
* @throws java.io.IOException if an I/O error occurs
*/
+ @java.io.Serial
private void writeObject(java.io.ObjectOutputStream s)
throws java.io.IOException {
final java.io.ObjectOutputStream.PutField fields = s.putFields();
final Object[] data;
synchronized (this) {
< prev index next >