[jdk20] RFR: 4958969: ObjectOutputStream example leads to non-working code

Naoto Sato naoto at openjdk.org
Mon Dec 19 20:37:54 UTC 2022


On Mon, 19 Dec 2022 20:12:15 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

> Update javadoc examples to use try-with-resources and use javadoc snippet tags.
> The examples in ObjectInputStream and ObjectOutputStream get an update with
> try-with-resources and use of javadoc snippet tags.
> ObjectInputFilter is updated with use of snippet tags instead of html markup.

LGTM, Roger.

src/java.base/share/classes/java/io/ObjectInputStream.java line 125:

> 123:  *          ObjectInputStream ois = new ObjectInputStream(fis)) {
> 124:  *         String label = (String) ois.readObject();
> 125:  *         LocalDateTime date = (LocalDateTime) ois.readObject();

Nit: I'd replace `date` with `dateTime`.

-------------

Marked as reviewed by naoto (Reviewer).

PR: https://git.openjdk.org/jdk20/pull/59


More information about the core-libs-dev mailing list