< prev index next >

src/java.base/share/classes/java/util/EnumMap.java

Print this page

        

*** 752,761 **** --- 752,762 ---- private static <K extends Enum<K>> K[] getKeyUniverse(Class<K> keyType) { return SharedSecrets.getJavaLangAccess() .getEnumConstantsShared(keyType); } + @java.io.Serial private static final long serialVersionUID = 458661240069192865L; /** * Save the state of the {@code EnumMap} instance to a stream (i.e., * serialize it).
*** 763,772 **** --- 764,774 ---- * @serialData The <i>size</i> of the enum map (the number of key-value * mappings) is emitted (int), followed by the key (Object) * and value (Object) for each key-value mapping represented * by the enum map. */ + @java.io.Serial private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException { // Write out the key type and any hidden stuff s.defaultWriteObject();
*** 788,797 **** --- 790,800 ---- /** * Reconstitute the {@code EnumMap} instance from a stream (i.e., * deserialize it). */ @SuppressWarnings("unchecked") + @java.io.Serial private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException { // Read in the key type and any hidden stuff s.defaultReadObject();
< prev index next >