commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 18815] - PredicatedCollection is not serializable.
Date Thu, 10 Apr 2003 02:16:03 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18815>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18815

PredicatedCollection is not serializable.

mohankishore@yahoo.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|PatchAvailable              |



------- Additional Comments From mohankishore@yahoo.com  2003-04-10 02:16 -------
Am removing the PatchAvailable keyword. Was rather naive of me...

There are many considerations to be made before making any of those classes 
Serializable. 
1) If we make the CollectionWrapper class Serializable, then all the subclasses 
seem to support Serializability - all of their member variables need to be 
Serializable (e.g. Predicate and Factory interfaces?)
2) I tried making just the PredicatedCollection Serializable. Had to break my 
head for a couple of hours to figure out why it was throwing a 
NotSerializableException. The TestPredicatedCollection was creating an 
anonymous inner class for the Predicate and it being an instance inner class, 
seems to be keeping a reference to the outer class. When the 
PredicatedCollection is trying to Serialize the Predicate, it in turn tries to 
Serialize the TestPredicatedCollection... Had to use new 
CollectionUtils.InstanceofPredicate(String.class) instead...
3) So, we have to decide what needs to be Serialized and then update the 
testing harness for the same... Currently, the testing harness tries to 
Serialize and then Deserialize all Serializable objects and compare them. For 
that to succeed, need to update the equals() method too...

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message