From 27770e6af7916c0e07866a099d2ca7e148abb55e Mon Sep 17 00:00:00 2001 From: Roger Riggs Date: Tue, 16 May 2017 09:42:38 -0400 Subject: [PATCH] 8180319: Update Serialization spec to omit obsolete serialver -show and change history Reviewed-by: chegar --- .../share/specs/serialization/changelog.md | 181 ------------------ .../share/specs/serialization/class.md | 8 +- .../specs/serialization/images/class.gif | Bin 4139 -> 0 bytes .../share/specs/serialization/index.md | 6 +- .../share/specs/serialization/security.md | 6 +- .../share/specs/serialization/serial-arch.md | 4 +- 6 files changed, 8 insertions(+), 197 deletions(-) delete mode 100644 jdk/src/java.base/share/specs/serialization/changelog.md delete mode 100644 jdk/src/java.base/share/specs/serialization/images/class.gif diff --git a/jdk/src/java.base/share/specs/serialization/changelog.md b/jdk/src/java.base/share/specs/serialization/changelog.md deleted file mode 100644 index 343dd5833ea..00000000000 --- a/jdk/src/java.base/share/specs/serialization/changelog.md +++ /dev/null @@ -1,181 +0,0 @@ ---- -# Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. - -include-before: '[CONTENTS](index.html) | [PREV](index.html) | [NEXT](serial-arch.html)' -include-after: '[CONTENTS](index.html) | [PREV](index.html) | [NEXT](serial-arch.html)' - -title: 'Java Object Serialization Specification: 0 - Change History' ---- - -------------------------------------------------------------------------------- - -May 12, 2005 Updates for Java^TM^ SE Development Kit, v6 Beta 1 - -- Added statement about how an array object returned by a `readResolve` - invocation for an unshared read is handled. -- Clarified the behavior in the event of an invalid `serialPersistentFields` - value. -- Clarified that `serialVersionUID` matching is waived for array classes. -- Clarified when `IllegalArgumentException` is thrown by - `ObjectOutputStream.PutFields` methods. - -July 24, 2003 Updates for Java^TM^ 2 SDK, Standard Edition, v1.5 Beta 1 - -- Added support for serializing enum constants. -- Added specification of class modifier flags used in the computation of - default `serialVersionUID` values to [Section 4.6, "Stream Unique - Identifiers"](class.html#stream-unique-identifiers). - -Aug. 16, 2001 Updates for Java^TM^ 2 SDK, Standard Edition, v1.4 Beta 2 - -- Added support for class-defined `readObjectNoData` methods, to be used for - initializing serializable class fields in cases not covered by - class-defined readObject methods. See [Section 3.5, "The readObjectNoData - Method"](input.html#the-readobjectnodata-method), as well as Appendix A, - "Security in Object Serialization". -- New methods `ObjectOutputStream.writeUnshared` and - `ObjectInputStream.readUnshared` provide a mechanism for ensuring unique - references to deserialized objects. See [Section 2.1, "The - ObjectOutputStream Class"](output.html#the-objectoutputstream-class), - [Section 3.1, "The ObjectInputStream - Class"](input.html#the-objectinputstream-class), as well as Appendix A, - "Security in Object Serialization". -- Documented new security checks in the one-argument constructors for - `ObjectOutputStream` and `ObjectInputStream`. See [Section 2.1, "The - ObjectOutputStream Class"](output.html#the-objectoutputstream-class) and - [Section 3.1, "The ObjectInputStream - Class"](input.html#the-objectinputstream-class). -- Added caution against using inner classes for serialization in [Section - 1.10, "The Serializable - Interface"](serial-arch.html#the-serializable-interface). -- Clarified requirement that class-defined `writeObject` methods invoke - `ObjectOutputStream.defaultWriteObject` or `writeFields` once before - writing optional data, and that class-defined `readObject` methods invoke - `ObjectInputStream.defaultReadObject` or `readFields` once before reading - optional data. See [Section 2.3, "The writeObject - Method"](output.html#the-writeobject-method) and [Section 3.4, "The - readObject Method"](input.html#the-readobject-method). -- Clarified the behavior of `ObjectInputStream` when class-defined - `readObject` or `readExternal` methods attempt read operations which exceed - the bounds of available data; see [Section 3.4, "The readObject - Method"](input.html#the-readobject-method) and [Section 3.6, "The - readExternal Method"](input.html#the-readexternal-method). -- Clarified the description of non-proxy class descriptor field type strings - to require that they be written in "field descriptor" format; see [Section - 6.2, "Stream Elements"](protocol.html#stream-elements). - -July 30, 1999 Updates for Java^TM^ 2 SDK, Standard Edition, v1.3 Beta - -- Added the ability to write `String` objects for which the UTF encoding is - longer than 65535 bytes in length. See [Section 6.2, "Stream - Elements"](protocol.html#stream-elements). -- New methods `ObjectOutputStream.writeClassDescriptor` and - `ObjectInputStream.readClassDescriptor` provide a means of customizing the - serialized representation of `ObjectStreamClass` class descriptors. See - [Section 2.1, "The ObjectOutputStream - Class"](output.html#the-objectoutputstream-class) and [Section 3.1, "The - ObjectInputStream Class"](input.html#the-objectinputstream-class). -- Expanded Appendix A, "[Security in Object - Serialization"](security.html#security-in-object-serialization). - -Sept. 30, 1998 Updates for JDK^TM^ 1.2 Beta4 RC1 - -- Documentation corrections only. - -June 22, 1998 Updates for JDK^TM^ 1.2 Beta4 - -- Eliminated JDK^TM^ 1.2 `java.io` interfaces, `Replaceable` and - `Resolvable`.References to either of these classes as an interface should - be replaced with `java.io.Serializable`. Serialization will use reflection - to invoke the methods, `writeReplace` and `readResolve`, if the - Serializable class defines these methods. See [Section 2.5, "The - writeReplace Method"](output.html#the-writereplace-method) and [Section - 3.7, "The readResolve Method"](input.html#the-readresolve-method). -- New javadoc tags *@serial*, *@serialField*, and *@serialData* provide a way - to document the Serialized Form of a Serializable class. Javadoc generates - a serialization specification based on the contents of these tags. See - [Section 1.6, "Documenting Serializable Fields and Data for a - Class"](serial-arch.html#documenting-serializable-fields-and-data-for-a-class). -- Special Serializable class member, `serialPersistentFields`, must be - declared private. See [Section 1.5, "Defining Serializable Fields for a - Class"](serial-arch.html#defining-serializable-fields-for-a-class). -- Clarified the steps involved in computing the `serialVersionUID` in - [Section 4.6, "Stream Unique - Identifiers"](class.html#stream-unique-identifiers). - -Feb. 6, 1998 Updates for JDK^TM^ 1.2 Beta 3 - -- Introduced the concept of `STREAM_PROTOCOL` versions. Added the - `STREAM_PROTOCOL_2` version to indicate a new format for `Externalizable` - objects that enable skipping by an `Externalizable` object within the - stream, even when the object's class is not available in the local Virtual - Machine. Compatibility issues are discussed in [Section 6.3, "Stream - Protocol Versions"](protocol.html#stream-protocol-versions). -- `The ObjectInputStream.resolveClass` method can return a local class in a - different package than the name of the class within the stream. This - capability enables renaming of packages between releases. The - `serialVersionUID` and the base class name must be the same in the stream - and in the local version of the class. See [Section 3.1, "The - ObjectInputStream Class"](input.html#the-objectinputstream-class). -- Allow substitution of `String` or `array` objects when writing them to or - reading them from the stream. See [Section 2.1, "The ObjectOutputStream - Class"](output.html#the-objectoutputstream-class) and [Section 3.1, "The - ObjectInputStream Class"](input.html#the-objectinputstream-class). - -Sept. 4, 1997 Updates for JDK^TM^ 1.2 Beta1 - -- Separated the Replaceable interface into two interfaces: Replaceable and - Resolvable. The Replaceable interface allows a class to nominate its own - replacement just before serializing the object to the stream. The - Resolvable interface allows a class to nominate its own replacement when - reading an object from the stream. -- Modified serialization to use the JDK^TM^ 1.2 security model. There is a - check for `SerializablePermission "enableSubstitution"` within the - `ObjectInputStream.enableReplace` and `ObjectOutputStream.enableResolve` - methods. See [Section 2.1, "The ObjectOutputStream - Class"](output.html#the-objectoutputstream-class) and [Section 3.1, "The - ObjectInputStream Class"](input.html#the-objectinputstream-class). -- Updated `writeObject`'s exception handler to write handled `IOException`s - into the stream. See [Section 2.1, "The ObjectOutputStream - Class"](output.html#the-objectoutputstream-class). - -July 3, 1997 Updates for JDK^TM^ 1.2 Alpha - -- Documented the requirements for specifying the serialized state of classes. - See [Section 1.5, "Defining Serializable Fields for a - Class"](serial-arch.html#defining-serializable-fields-for-a-class). -- Added the Serializable Fields API to allow classes more flexibility in - accessing the serialized fields of a class. The stream protocol is - unchanged. See [Section 1.7, "Accessing Serializable Fields of a - Class](serial-arch.html#accessing-serializable-fields-of-a-class)," - [Section 2.2, "The ObjectOutputStream.PutField - Class](output.html#the-objectoutputstream.putfield-class)," and [Section - 3.2, "The ObjectInputStream.GetField - Class"](input.html#the-objectinputstream.getfield-class). -- Clarified that field descriptors and data are written to and read from the - stream in canonical order. See [Section 4.1, "The ObjectStreamClass - Class"](class.html#the-objectstreamclass-class). - -------------------------------------------------------------------------------- - -*[Copyright](../../../legal/SMICopyright.html) © 2005, 2017, Oracle -and/or its affiliates. All rights reserved.* diff --git a/jdk/src/java.base/share/specs/serialization/class.md b/jdk/src/java.base/share/specs/serialization/class.md index 5393b0bc6c3..03b94b7d099 100644 --- a/jdk/src/java.base/share/specs/serialization/class.md +++ b/jdk/src/java.base/share/specs/serialization/class.md @@ -241,13 +241,7 @@ The `toString` method returns a printable representation with name and type. ## 4.5 Inspecting Serializable Classes The program *serialver* can be used to find out if a class is serializable and -to get its `serialVersionUID`. When invoked with the-show option, it puts up a -simple user interface. To find out if a class is serializable and to find out -its *serialVersionUID*`,` enter its full class name, then press either the -Enter or the Show button. The string printed can be copied and pasted into the -evolved class. - -> ![*serialver, Serial Version Inspector program*](images/class.gif) +to get its `serialVersionUID`. When invoked on the command line with one or more class names, serialver prints the `serialVersionUID` for each class in a form suitable for copying into an diff --git a/jdk/src/java.base/share/specs/serialization/images/class.gif b/jdk/src/java.base/share/specs/serialization/images/class.gif deleted file mode 100644 index 15b4bf80c59c233a29144f0d5fb44ff9ce27f2b3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4139 zcmeH{`8yPB)W>gBh7e_$=FzG$(Nj{{l1F7NNvSMJmh8$FX2w{?He+c_WLC!5X2ue- z4rL;eJ+i0Llgd__5N0r5p7&pPe|*mm=eqB6o$u$|=Umr)OwCPnw4F6X5nu^ynz_z> zKR>@1x8~&Jk|_b>+9ojSClmSs>C0)D;210ALG3 zy#R3E#3-(Vi02d3C z2_hRJs7_NbD7OM7KveIr#l4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jciB8;H%x8U)^L8!cem@^!d{;+M38`{PUgT%Hc^5(i1W~lb(zcSBCCois zv=+jF)EZXg8Bh9#@r5V$EZgqU3U3>5^gu)@EXTV-v5&=*`mph1kl6l76c>&^3Q3$8 zj=e+~bw%|a8^$SDVoVE-VJO%V|%T3xqzI=ofF zPq*S{a53Rf0@^cKzBb9t76G9Ux_8AT>clN@kc4GifKIefJ5r=Iv9m9waZBV+B_ZyY zN9;NWD~(GPtBs@IOx;I}N}EjMKnNK_5ksxGLnF>h;_;=!coz=l)0@~L7RsU^Uc)P` zM=W*5BsrX9e1wz!ax&ei&G$Ywed$Q5^Hi#H%@gNZqM9jD#e?XSK=jomJ>2d0fFI~T zl^$qELXVIlLP$&^>2@tC!j2r@b}5PS}2(Mrd3=Dhsh03>0JeAp)qnnoRD9CTN)@o_YM+H1^M=?FAOz%3TuRy^?a=#{3 zt-F``(4G~7Vj-xkzyqwV$6gTvRuqgKt;gOIYtN2Hv2j#(VjVmAJsU4z6JQ0YdIe7; KjYUMj+5Z7Z0Atkv diff --git a/jdk/src/java.base/share/specs/serialization/index.md b/jdk/src/java.base/share/specs/serialization/index.md index c254405c8ed..1ad49f7cbdc 100644 --- a/jdk/src/java.base/share/specs/serialization/index.md +++ b/jdk/src/java.base/share/specs/serialization/index.md @@ -20,8 +20,8 @@ # or visit www.oracle.com if you need additional information or have any # questions. -include-before: 'CONTENTS | PREV | [NEXT](changelog.html)' -include-after: 'CONTENTS | PREV | [NEXT](changelog.html)' +include-before: 'CONTENTS | PREV | [NEXT](serial-arch.html)' +include-after: 'CONTENTS | PREV | [NEXT](serial-arch.html)' title: 'Java Object Serialization Specification: Contents' --- @@ -30,8 +30,6 @@ title: 'Java Object Serialization Specification: Contents' ## Table of Contents -### 0 [Change History](changelog.html) - ### 1 [System Architecture](serial-arch.html) - 1.1 [Overview](serial-arch.html#overview) diff --git a/jdk/src/java.base/share/specs/serialization/security.md b/jdk/src/java.base/share/specs/serialization/security.md index 14848f080b1..9f26748daa9 100644 --- a/jdk/src/java.base/share/specs/serialization/security.md +++ b/jdk/src/java.base/share/specs/serialization/security.md @@ -28,9 +28,9 @@ title: 'Java Object Serialization Specification: A - Security in Object Serializ ------------------------------------------------------------------------------- -Refer to the [Secure Coding Guidelines for the Java Programming -Language](http://www.oracle.com/technetwork/java/seccodeguide-139067.html) for -information about security in object serialization. +Refer to the [Secure Coding Guidelines for the Java Programming +Language](http://www.oracle.com/pls/topic/lookup?ctx=javase9&id=secure_coding_guidelines_javase) +for information about security in object serialization. ------------------------------------------------------------------------------- diff --git a/jdk/src/java.base/share/specs/serialization/serial-arch.md b/jdk/src/java.base/share/specs/serialization/serial-arch.md index 0cfe94993ea..4ff54731688 100644 --- a/jdk/src/java.base/share/specs/serialization/serial-arch.md +++ b/jdk/src/java.base/share/specs/serialization/serial-arch.md @@ -20,8 +20,8 @@ # or visit www.oracle.com if you need additional information or have any # questions. -include-before: '[CONTENTS](index.html) | [PREV](changelog.html) | [NEXT](output.html)' -include-after: '[CONTENTS](index.html) | [PREV](changelog.html) | [NEXT](output.html)' +include-before: '[CONTENTS](index.html) | [PREV](index.html) | [NEXT](output.html)' +include-after: '[CONTENTS](index.html) | [PREV](index.html) | [NEXT](output.html)' title: 'Java Object Serialization Specification: 1 - System Architecture' ---