jdk/src/java.base/share/specs/serialization/changelog.md
changeset 47129 9db10256ba85
parent 47128 f88316f78414
parent 45186 387a39577f09
child 47130 7dc75503383a
equal deleted inserted replaced
47128:f88316f78414 47129:9db10256ba85
     1 ---
       
     2 # Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
       
     3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       
     4 #
       
     5 # This code is free software; you can redistribute it and/or modify it
       
     6 # under the terms of the GNU General Public License version 2 only, as
       
     7 # published by the Free Software Foundation.
       
     8 #
       
     9 # This code is distributed in the hope that it will be useful, but WITHOUT
       
    10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
       
    11 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
       
    12 # version 2 for more details (a copy is included in the LICENSE file that
       
    13 # accompanied this code).
       
    14 #
       
    15 # You should have received a copy of the GNU General Public License version
       
    16 # 2 along with this work; if not, write to the Free Software Foundation,
       
    17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
       
    18 #
       
    19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
       
    20 # or visit www.oracle.com if you need additional information or have any
       
    21 # questions.
       
    22 
       
    23 include-before: '[CONTENTS](index.html) | [PREV](index.html) | [NEXT](serial-arch.html)'
       
    24 include-after: '[CONTENTS](index.html) | [PREV](index.html) | [NEXT](serial-arch.html)'
       
    25 
       
    26 title: 'Java Object Serialization Specification: 0 - Change History'
       
    27 ---
       
    28 
       
    29 -------------------------------------------------------------------------------
       
    30 
       
    31 May 12, 2005 Updates for Java^TM^ SE Development Kit, v6 Beta 1
       
    32 
       
    33 -   Added statement about how an array object returned by a `readResolve`
       
    34     invocation for an unshared read is handled.
       
    35 -   Clarified the behavior in the event of an invalid `serialPersistentFields`
       
    36     value.
       
    37 -   Clarified that `serialVersionUID` matching is waived for array classes.
       
    38 -   Clarified when `IllegalArgumentException` is thrown by
       
    39     `ObjectOutputStream.PutFields` methods.
       
    40 
       
    41 July 24, 2003 Updates for Java^TM^ 2 SDK, Standard Edition, v1.5 Beta 1
       
    42 
       
    43 -   Added support for serializing enum constants.
       
    44 -   Added specification of class modifier flags used in the computation of
       
    45     default `serialVersionUID` values to [Section 4.6, "Stream Unique
       
    46     Identifiers"](class.html#stream-unique-identifiers).
       
    47 
       
    48 Aug. 16, 2001 Updates for Java^TM^ 2 SDK, Standard Edition, v1.4 Beta 2
       
    49 
       
    50 -   Added support for class-defined `readObjectNoData` methods, to be used for
       
    51     initializing serializable class fields in cases not covered by
       
    52     class-defined readObject methods. See [Section 3.5, "The readObjectNoData
       
    53     Method"](input.html#the-readobjectnodata-method), as well as Appendix A,
       
    54     "Security in Object Serialization".
       
    55 -   New methods `ObjectOutputStream.writeUnshared` and
       
    56     `ObjectInputStream.readUnshared` provide a mechanism for ensuring unique
       
    57     references to deserialized objects. See [Section 2.1, "The
       
    58     ObjectOutputStream Class"](output.html#the-objectoutputstream-class),
       
    59     [Section 3.1, "The ObjectInputStream
       
    60     Class"](input.html#the-objectinputstream-class), as well as Appendix A,
       
    61     "Security in Object Serialization".
       
    62 -   Documented new security checks in the one-argument constructors for
       
    63     `ObjectOutputStream` and `ObjectInputStream`. See [Section 2.1, "The
       
    64     ObjectOutputStream Class"](output.html#the-objectoutputstream-class) and
       
    65     [Section 3.1, "The ObjectInputStream
       
    66     Class"](input.html#the-objectinputstream-class).
       
    67 -   Added caution against using inner classes for serialization in [Section
       
    68     1.10, "The Serializable
       
    69     Interface"](serial-arch.html#the-serializable-interface).
       
    70 -   Clarified requirement that class-defined `writeObject` methods invoke
       
    71     `ObjectOutputStream.defaultWriteObject` or `writeFields` once before
       
    72     writing optional data, and that class-defined `readObject` methods invoke
       
    73     `ObjectInputStream.defaultReadObject` or `readFields` once before reading
       
    74     optional data. See [Section 2.3, "The writeObject
       
    75     Method"](output.html#the-writeobject-method) and [Section 3.4, "The
       
    76     readObject Method"](input.html#the-readobject-method).
       
    77 -   Clarified the behavior of `ObjectInputStream` when class-defined
       
    78     `readObject` or `readExternal` methods attempt read operations which exceed
       
    79     the bounds of available data; see [Section 3.4, "The readObject
       
    80     Method"](input.html#the-readobject-method) and [Section 3.6, "The
       
    81     readExternal Method"](input.html#the-readexternal-method).
       
    82 -   Clarified the description of non-proxy class descriptor field type strings
       
    83     to require that they be written in "field descriptor" format; see [Section
       
    84     6.2, "Stream Elements"](protocol.html#stream-elements).
       
    85 
       
    86 July 30, 1999 Updates for Java^TM^ 2 SDK, Standard Edition, v1.3 Beta
       
    87 
       
    88 -   Added the ability to write `String` objects for which the UTF encoding is
       
    89     longer than 65535 bytes in length. See [Section 6.2, "Stream
       
    90     Elements"](protocol.html#stream-elements).
       
    91 -   New methods `ObjectOutputStream.writeClassDescriptor` and
       
    92     `ObjectInputStream.readClassDescriptor` provide a means of customizing the
       
    93     serialized representation of `ObjectStreamClass` class descriptors. See
       
    94     [Section 2.1, "The ObjectOutputStream
       
    95     Class"](output.html#the-objectoutputstream-class) and [Section 3.1, "The
       
    96     ObjectInputStream Class"](input.html#the-objectinputstream-class).
       
    97 -   Expanded Appendix A, "[Security in Object
       
    98     Serialization"](security.html#security-in-object-serialization).
       
    99 
       
   100 Sept. 30, 1998 Updates for JDK^TM^ 1.2 Beta4 RC1
       
   101 
       
   102 -   Documentation corrections only.
       
   103 
       
   104 June 22, 1998 Updates for JDK^TM^ 1.2 Beta4
       
   105 
       
   106 -   Eliminated JDK^TM^ 1.2 `java.io` interfaces, `Replaceable` and
       
   107     `Resolvable`.References to either of these classes as an interface should
       
   108     be replaced with `java.io.Serializable`. Serialization will use reflection
       
   109     to invoke the methods, `writeReplace` and `readResolve`, if the
       
   110     Serializable class defines these methods. See [Section 2.5, "The
       
   111     writeReplace Method"](output.html#the-writereplace-method) and [Section
       
   112     3.7, "The readResolve Method"](input.html#the-readresolve-method).
       
   113 -   New javadoc tags *@serial*, *@serialField*, and *@serialData* provide a way
       
   114     to document the Serialized Form of a Serializable class. Javadoc generates
       
   115     a serialization specification based on the contents of these tags. See
       
   116     [Section 1.6, "Documenting Serializable Fields and Data for a
       
   117     Class"](serial-arch.html#documenting-serializable-fields-and-data-for-a-class).
       
   118 -   Special Serializable class member, `serialPersistentFields`, must be
       
   119     declared private. See [Section 1.5, "Defining Serializable Fields for a
       
   120     Class"](serial-arch.html#defining-serializable-fields-for-a-class).
       
   121 -   Clarified the steps involved in computing the `serialVersionUID` in
       
   122     [Section 4.6, "Stream Unique
       
   123     Identifiers"](class.html#stream-unique-identifiers).
       
   124 
       
   125 Feb. 6, 1998 Updates for JDK^TM^ 1.2 Beta 3
       
   126 
       
   127 -   Introduced the concept of `STREAM_PROTOCOL` versions. Added the
       
   128     `STREAM_PROTOCOL_2` version to indicate a new format for `Externalizable`
       
   129     objects that enable skipping by an `Externalizable` object within the
       
   130     stream, even when the object's class is not available in the local Virtual
       
   131     Machine. Compatibility issues are discussed in [Section 6.3, "Stream
       
   132     Protocol Versions"](protocol.html#stream-protocol-versions).
       
   133 -   `The ObjectInputStream.resolveClass` method can return a local class in a
       
   134     different package than the name of the class within the stream. This
       
   135     capability enables renaming of packages between releases. The
       
   136     `serialVersionUID` and the base class name must be the same in the stream
       
   137     and in the local version of the class. See [Section 3.1, "The
       
   138     ObjectInputStream Class"](input.html#the-objectinputstream-class).
       
   139 -   Allow substitution of `String` or `array` objects when writing them to or
       
   140     reading them from the stream. See [Section 2.1, "The ObjectOutputStream
       
   141     Class"](output.html#the-objectoutputstream-class) and [Section 3.1, "The
       
   142     ObjectInputStream Class"](input.html#the-objectinputstream-class).
       
   143 
       
   144 Sept. 4, 1997 Updates for JDK^TM^ 1.2 Beta1
       
   145 
       
   146 -   Separated the Replaceable interface into two interfaces: Replaceable and
       
   147     Resolvable. The Replaceable interface allows a class to nominate its own
       
   148     replacement just before serializing the object to the stream. The
       
   149     Resolvable interface allows a class to nominate its own replacement when
       
   150     reading an object from the stream.
       
   151 -   Modified serialization to use the JDK^TM^ 1.2 security model. There is a
       
   152     check for `SerializablePermission "enableSubstitution"` within the
       
   153     `ObjectInputStream.enableReplace` and `ObjectOutputStream.enableResolve`
       
   154     methods. See [Section 2.1, "The ObjectOutputStream
       
   155     Class"](output.html#the-objectoutputstream-class) and [Section 3.1, "The
       
   156     ObjectInputStream Class"](input.html#the-objectinputstream-class).
       
   157 -   Updated `writeObject`'s exception handler to write handled `IOException`s
       
   158     into the stream. See [Section 2.1, "The ObjectOutputStream
       
   159     Class"](output.html#the-objectoutputstream-class).
       
   160 
       
   161 July 3, 1997 Updates for JDK^TM^ 1.2 Alpha
       
   162 
       
   163 -   Documented the requirements for specifying the serialized state of classes.
       
   164     See [Section 1.5, "Defining Serializable Fields for a
       
   165     Class"](serial-arch.html#defining-serializable-fields-for-a-class).
       
   166 -   Added the Serializable Fields API to allow classes more flexibility in
       
   167     accessing the serialized fields of a class. The stream protocol is
       
   168     unchanged. See [Section 1.7, "Accessing Serializable Fields of a
       
   169     Class](serial-arch.html#accessing-serializable-fields-of-a-class),"
       
   170     [Section 2.2, "The ObjectOutputStream.PutField
       
   171     Class](output.html#the-objectoutputstream.putfield-class)," and [Section
       
   172     3.2, "The ObjectInputStream.GetField
       
   173     Class"](input.html#the-objectinputstream.getfield-class).
       
   174 -   Clarified that field descriptors and data are written to and read from the
       
   175     stream in canonical order. See [Section 4.1, "The ObjectStreamClass
       
   176     Class"](class.html#the-objectstreamclass-class).
       
   177 
       
   178 -------------------------------------------------------------------------------
       
   179 
       
   180 *[Copyright](../../../legal/SMICopyright.html) © 2005, 2017, Oracle
       
   181 and/or its affiliates. All rights reserved.*