equal
deleted
inserted
replaced
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 |
112 public static final MinguoChronology INSTANCE = new MinguoChronology(); |
112 public static final MinguoChronology INSTANCE = new MinguoChronology(); |
113 |
113 |
114 /** |
114 /** |
115 * Serialization version. |
115 * Serialization version. |
116 */ |
116 */ |
|
117 @java.io.Serial |
117 private static final long serialVersionUID = 1039765215346859963L; |
118 private static final long serialVersionUID = 1039765215346859963L; |
118 /** |
119 /** |
119 * The difference in years between ISO and Minguo. |
120 * The difference in years between ISO and Minguo. |
120 */ |
121 */ |
121 static final int YEARS_DIFFERENCE = 1911; |
122 static final int YEARS_DIFFERENCE = 1911; |
345 * </pre> |
346 * </pre> |
346 * |
347 * |
347 * @return the instance of {@code Ser}, not null |
348 * @return the instance of {@code Ser}, not null |
348 */ |
349 */ |
349 @Override |
350 @Override |
|
351 @java.io.Serial |
350 Object writeReplace() { |
352 Object writeReplace() { |
351 return super.writeReplace(); |
353 return super.writeReplace(); |
352 } |
354 } |
353 |
355 |
354 /** |
356 /** |
355 * Defend against malicious streams. |
357 * Defend against malicious streams. |
356 * |
358 * |
357 * @param s the stream to read |
359 * @param s the stream to read |
358 * @throws InvalidObjectException always |
360 * @throws InvalidObjectException always |
359 */ |
361 */ |
|
362 @java.io.Serial |
360 private void readObject(ObjectInputStream s) throws InvalidObjectException { |
363 private void readObject(ObjectInputStream s) throws InvalidObjectException { |
361 throw new InvalidObjectException("Deserialization via serialization delegate"); |
364 throw new InvalidObjectException("Deserialization via serialization delegate"); |
362 } |
365 } |
363 } |
366 } |