Tell ProGuard to preserve serialization hooks. (re: issue 122) #131

Merged
merged 1 commit into from May 20, 2012

Projects

None yet

2 participants

@rst
rst commented May 18, 2012

Without specific notice, ProGuard will lop off readObject, readResolve, etc.,
which can lead to baffling failures, even when just serializing library
classes. For example, if you're serializing Scala Option[T] objects, losing
readResolve can get you duplicates of None, which is ordinarily a singleton;
that, in turn, can lead to spurious, and very strange-looking MatchExceptions.

@rst rst Tell ProGuard to preserve serialization hooks.
Without specific notice, ProGuard will lop off readObject, readResolve, etc.,
which can lead to baffling failures, even when just serializing library
classes.  For example, if you're serializing Scala Option[T] objects, losing
readResolve can get you duplicates of None, which is ordinarily a singleton;
that, in turn, can lead to spurious, and very strange-looking MatchExceptions.
a58c221
@jberkel jberkel merged commit 99639f8 into jberkel:master May 20, 2012
@jberkel
Owner
jberkel commented May 20, 2012

as a side note, it's a bad idea to use Java serialization in Android - it is very slow (cf. http://code.google.com/p/android/issues/detail?id=13138).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment