src/java.base/share/classes/java/time/LocalDateTime.java
changeset 57956 e0b8b019d2f5
parent 52078 4a63197816ce
equal deleted inserted replaced
57955:18863bf3501f 57956:e0b8b019d2f5
     1 /*
     1 /*
     2  * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     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
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   151     public static final LocalDateTime MAX = LocalDateTime.of(LocalDate.MAX, LocalTime.MAX);
   151     public static final LocalDateTime MAX = LocalDateTime.of(LocalDate.MAX, LocalTime.MAX);
   152 
   152 
   153     /**
   153     /**
   154      * Serialization version.
   154      * Serialization version.
   155      */
   155      */
       
   156     @java.io.Serial
   156     private static final long serialVersionUID = 6207766400415563566L;
   157     private static final long serialVersionUID = 6207766400415563566L;
   157 
   158 
   158     /**
   159     /**
   159      * The date part.
   160      * The date part.
   160      */
   161      */
  1983      *  // the <a href="{@docRoot}/serialized-form.html#java.time.LocalTime">time</a> excluding the one byte header
  1984      *  // the <a href="{@docRoot}/serialized-form.html#java.time.LocalTime">time</a> excluding the one byte header
  1984      * </pre>
  1985      * </pre>
  1985      *
  1986      *
  1986      * @return the instance of {@code Ser}, not null
  1987      * @return the instance of {@code Ser}, not null
  1987      */
  1988      */
       
  1989     @java.io.Serial
  1988     private Object writeReplace() {
  1990     private Object writeReplace() {
  1989         return new Ser(Ser.LOCAL_DATE_TIME_TYPE, this);
  1991         return new Ser(Ser.LOCAL_DATE_TIME_TYPE, this);
  1990     }
  1992     }
  1991 
  1993 
  1992     /**
  1994     /**
  1993      * Defend against malicious streams.
  1995      * Defend against malicious streams.
  1994      *
  1996      *
  1995      * @param s the stream to read
  1997      * @param s the stream to read
  1996      * @throws InvalidObjectException always
  1998      * @throws InvalidObjectException always
  1997      */
  1999      */
       
  2000     @java.io.Serial
  1998     private void readObject(ObjectInputStream s) throws InvalidObjectException {
  2001     private void readObject(ObjectInputStream s) throws InvalidObjectException {
  1999         throw new InvalidObjectException("Deserialization via serialization delegate");
  2002         throw new InvalidObjectException("Deserialization via serialization delegate");
  2000     }
  2003     }
  2001 
  2004 
  2002     void writeExternal(DataOutput out) throws IOException {
  2005     void writeExternal(DataOutput out) throws IOException {