WeekFields.java 文件源码

java
阅读 20 收藏 0 点赞 0 评论 0

项目:openjdk-jdk10 作者:
/**
 * Restore the state of a WeekFields from the stream.
 * Check that the values are valid.
 *
 * @param s the stream to read
 * @throws InvalidObjectException if the serialized object has an invalid
 *     value for firstDayOfWeek or minimalDays.
 * @throws ClassNotFoundException if a class cannot be resolved
 */
private void readObject(ObjectInputStream s)
     throws IOException, ClassNotFoundException, InvalidObjectException
{
    s.defaultReadObject();
    if (firstDayOfWeek == null) {
        throw new InvalidObjectException("firstDayOfWeek is null");
    }

    if (minimalDays < 1 || minimalDays > 7) {
        throw new InvalidObjectException("Minimal number of days is invalid");
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号