[Cosmo-dev] Re: [commits-cosmo] (rletness) [4051] calculate calendar bytes length at time of spooling to ensure

Randy Letness randy at osafoundation.org
Fri Apr 6 09:51:55 PDT 2007

Brian Moseley wrote:
> can you think of a reason we use IOUtil.spool here instead of ical4j's
> CalendarOutputter? i don't believe that does any copying under the
> hood. of course, it removes the capability of logging the mismatching
> length warning that you just added.

Yeah I can't think of another reason.  CalendarOutputer does some 
special stuff like line folding it looks like.  They both first convert 
the Calendar object to a string before outputting.

> i assume that this warning is to help track down the problem we're
> having of the content length being set incorrectly in the database. i
> thought we had some custom hibernate foo to automatically set the
> content length based on the length of the data in the calendar blob
> column. is that not so?

The problem is that there are some instances where:


results in data loss, meaning the output string of the first parse is 
not equal to the output of the second parse. This usually occurs when 
the ical data contains escaped text with quotes.  I've logged this as an 
ical4j bug. 


More information about the cosmo-dev mailing list