EHC ❯ getSerializedSize always returns 0
-
Bug
-
Status: Closed
-
-
Resolution: Fixed
-
-
-
drb
-
Reporter: sourceforgetracker
-
September 21, 2009
-
0
-
Watchers: 0
-
September 22, 2009
-
September 22, 2009
Description
Element.getSerializedSize() always returns zero. Currently, if the Element can be serialized to a stream, instead of returning the number of bytes sent to the stream, the value of the variable size is returned. This patch will fix the problem.
Index: src/java/net/sf/ehcache/Element.java
RCS file: /cvsroot/ehcache/ehcache/src/java/net/sf/ehcache/Element.java,v retrieving revision 1.15 diff -u -r1.15 Element.java — src/java/net/sf/ehcache/Element.java 3 Jul 2004 07:46:34 -0000 1.15 +++ src/java/net/sf/ehcache/Element.java 8 Sep 2004 12:03:15 -0000 @@ -296,7 +296,7 @@ try { oos = new ObjectOutputStream(bout); oos.writeObject(this);
- return size;
- return bout.size(); } catch (IOException e) { LOG.error(“Error measuring element size for element with key “ + key); }
Sourceforge Ticket ID: 1024334 - Opened By: nobody - 8 Sep 2004 12:03 UTC
Comments
Sourceforge Tracker 2009-09-21
Fiona OShea 2009-09-22
Re-opening so that I can properly close out these issues and have correct Resolution status in Jira
Logged In: YES user_id=693320
This bug was reported in the forums and fixed in CVS back on the 17 July. I have been production testing some large scale changes to the Disk Store pending a 1.0 release, which is why I have not done a release.
My change has the same effect as your patch.
Sorry for the inconvenience.
Greg Luck Comment by: gregluck - 20 Sep 2004 02:14 UTC