jdk/src/share/classes/java/time/chrono/MinguoChronology.java
changeset 19841 15c8e97d6a14
parent 19030 32f129cb6351
child 20794 ec823009c5f7
equal deleted inserted replaced
19822:4e10a58fa28f 19841:15c8e97d6a14
    54  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    54  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    55  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    55  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    56  */
    56  */
    57 package java.time.chrono;
    57 package java.time.chrono;
    58 
    58 
       
    59 import java.io.InvalidObjectException;
       
    60 import java.io.ObjectStreamException;
    59 import static java.time.temporal.ChronoField.PROLEPTIC_MONTH;
    61 import static java.time.temporal.ChronoField.PROLEPTIC_MONTH;
    60 import static java.time.temporal.ChronoField.YEAR;
    62 import static java.time.temporal.ChronoField.YEAR;
    61 
    63 
    62 import java.io.Serializable;
    64 import java.io.Serializable;
    63 import java.time.Clock;
    65 import java.time.Clock;
   331     @Override  // override for return type
   333     @Override  // override for return type
   332     public MinguoDate resolveDate(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) {
   334     public MinguoDate resolveDate(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) {
   333         return (MinguoDate) super.resolveDate(fieldValues, resolverStyle);
   335         return (MinguoDate) super.resolveDate(fieldValues, resolverStyle);
   334     }
   336     }
   335 
   337 
       
   338     //-----------------------------------------------------------------------
       
   339     /**
       
   340      * Writes the Chronology using a
       
   341      * <a href="../../../serialized-form.html#java.time.chrono.Ser">dedicated serialized form</a>.
       
   342      * @serialData
       
   343      * <pre>
       
   344      *  out.writeByte(1);     // identifies a Chronology
       
   345      *  out.writeUTF(getId());
       
   346      * </pre>
       
   347      *
       
   348      * @return the instance of {@code Ser}, not null
       
   349      */
       
   350     @Override
       
   351     Object writeReplace() {
       
   352         return super.writeReplace();
       
   353     }
       
   354 
       
   355     /**
       
   356      * Defend against malicious streams.
       
   357      * @return never
       
   358      * @throws InvalidObjectException always
       
   359      */
       
   360     private Object readResolve() throws InvalidObjectException {
       
   361         throw new InvalidObjectException("Deserialization via serialization delegate");
       
   362     }
   336 }
   363 }