Dear Wiki user, You have subscribed to a wiki page or wiki category on "River Wiki" for change notification.
The "Serialization" page has been changed by PeterFirmstone: http://wiki.apache.org/river/Serialization?action=diff&rev1=16&rev2=17 out.defaultWriteObject(); } - private Object readResolve(){ + private Object readResolve() throws ObjectStreamException { return build(); } } @@ -173, +173 @@ return this; } - private Object readResolve(){ + private Object readResolve() throws ObjectStreamException { serialBuilt = build(); return serialBuilt; } @@ -216, +216 @@ The Serializable Builder pattern is inspired by the Serializable Proxy pattern[1], where the proxy has been decoupled using an abstract builder. + == Discussion == + + If circular references are possible, make sure to also implement compatible equals and hashCode methods, in the case above AbstractMap does so on our behalf, equals and hashCode needs to be implemented in a common superclass. + + Care needs to be taken to ensure implementation classes remain decoupled from their serialized form implementations. + == References == [1] Joshua Bloch "Effective Java Second Edition" Item 78, Page 312. ISBN-10: 0-321-35668-3
