equal
deleted
inserted
replaced
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; |
367 @Override // override for return type |
369 @Override // override for return type |
368 public ThaiBuddhistDate resolveDate(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) { |
370 public ThaiBuddhistDate resolveDate(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) { |
369 return (ThaiBuddhistDate) super.resolveDate(fieldValues, resolverStyle); |
371 return (ThaiBuddhistDate) super.resolveDate(fieldValues, resolverStyle); |
370 } |
372 } |
371 |
373 |
|
374 //----------------------------------------------------------------------- |
|
375 /** |
|
376 * Writes the Chronology using a |
|
377 * <a href="../../../serialized-form.html#java.time.chrono.Ser">dedicated serialized form</a>. |
|
378 * @serialData |
|
379 * <pre> |
|
380 * out.writeByte(1); // identifies a Chronology |
|
381 * out.writeUTF(getId()); |
|
382 * </pre> |
|
383 * |
|
384 * @return the instance of {@code Ser}, not null |
|
385 */ |
|
386 @Override |
|
387 Object writeReplace() { |
|
388 return super.writeReplace(); |
|
389 } |
|
390 |
|
391 /** |
|
392 * Defend against malicious streams. |
|
393 * @return never |
|
394 * @throws InvalidObjectException always |
|
395 */ |
|
396 private Object readResolve() throws InvalidObjectException { |
|
397 throw new InvalidObjectException("Deserialization via serialization delegate"); |
|
398 } |
372 } |
399 } |