Proper Java serialization support for LocalAddress

This commit is contained in:
Trustin Lee 2009-02-09 05:04:49 +00:00
parent a4c491498b
commit 73e8954239

View File

@ -101,4 +101,9 @@ public final class LocalAddress extends SocketAddress implements Comparable<Loca
public String toString() {
return getId();
}
// Just in case someone serializes this class ..
private Object readResolve() {
return getInstance(getId());
}
}