commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bruno P. Kinoshita" <>
Subject [functor] Keep Serializable in [functor] or drop it?
Date Mon, 09 Apr 2012 16:55:14 GMT
Hi all,

I was writing some tests for [functor] when I found that one of my tests 
was failing with a NotSerializableException. The test uses a class that 
extends PredicatedLoop. This class contains a Procedure and a Predicate 
member fields, which are not serializable.

I remember seeing some discussion about keeping serialization support in 
the API, or dropping it and letting the user handle this in his code.

Should we keep it or drop it? :)

If we decide to keep it:

- PredicatedLoop serializable but some of its members are not. We could 
make them implement Serializable or use writeObject and readObject. If 
we went with the former, a series of other changes would be required as 
well (Limit and Offset don't implement equals or hashcode, for instance, 
and are used in some tests of algorithms). The latter choice would 
require attention in case someone changed the object members 

- Probably there are other classes in the same situation, then these 
classes would have to be updated as well.

If we decide to drop the serialization support in [functor] API:

- Users would have to handle serialization in their code.

- We would have to refactor many functors

- The BaseFunctorTest methods related to serialization would be removed

- Javadoc would have to be updated in some classes as well

Many thanks in advance.

Bruno P. Kinoshita

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message