/**
* Restore the state of an ValueRange from the stream.
* Check that the values are valid.
*
* @param s the stream to read
* @throws InvalidObjectException if
* the smallest minimum is greater than the smallest maximum,
* or the smallest maximum is greater than the largest maximum
* or the largest minimum is greater than the largest maximum
* @throws ClassNotFoundException if a class cannot be resolved
*/
private void readObject(ObjectInputStream s)
throws IOException, ClassNotFoundException, InvalidObjectException
{
s.defaultReadObject();
if (minSmallest > minLargest) {
throw new InvalidObjectException("Smallest minimum value must be less than largest minimum value");
}
if (maxSmallest > maxLargest) {
throw new InvalidObjectException("Smallest maximum value must be less than largest maximum value");
}
if (minLargest > maxLargest) {
throw new InvalidObjectException("Minimum value must be less than maximum value");
}
}
ValueRange.java 文件源码
java
阅读 17
收藏 0
点赞 0
评论 0
项目:jdk8u-jdk
作者:
评论列表
文章目录