Update 88. 保护性的编写 readObject 方法.md

This commit is contained in:
Joe 2019-03-05 11:26:47 +08:00 committed by GitHub
parent 32d7db6f19
commit 7d5f09370b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,8 +17,7 @@ public final class Period {
this.start = new Date(start.getTime());
this.end = new Date(end.getTime());
if (this.start.compareTo(this.end) > 0)
throw new IllegalArgumentException(
start + " after " + end);
throw new IllegalArgumentException(start + " after " + end);
}
public Date start () {
return new Date(start.getTime());