Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/effectivejava/chapter12/item90/Period.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ private static class SerializationProxy implements Serializable {

private static final long serialVersionUID =
234098243823485285L; // Any number will do (Item 87)

private Object readResolve() {
return new Period(start, end); // Uses public constructor
}
}

// writeReplace method for the serialization proxy pattern
Expand Down