commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton" <>
Subject [BeanUtils] RC2 of 1.8.0
Date Sat, 26 Jul 2008 03:11:13 GMT
I had the following chat (off-list) with Paul Benedict about BeanUtils
1.8.0, and thought it may be of interest (forwarded with his

---------- Forwarded message ----------
From: Paul Benedict
Date: Sat, Jul 26, 2008 at 4:03 AM

3:45 AM why don't you cut an RC2 of 1.8.0 bean utils?
  or push the last 2-3 items to a 1.8.1
 me: Ughhh, coz I screwed up big time :(
 Paul: what do you mean?!?!
3:50 AM me: OK I made an assumption about FastHashMap, based on my
memory rather than checking. I thought in "fast" mode it just behaved
like a HashMap - but it doesn't. In "slow" mode its synchronized, but
in "fast" mode it creates a new Map every time its modified. Anyway,
so I'd gone through ripping out FastHashMap a while ago (thinking it
was stupid that it had been used in the first place - because of my
false assumption) and replacing it with WeakHashMap to fix the memory
leaks - but now I've made it NOT thread safe. So I need to revisit and
put back a WeakFastHashMap or some such thing
 Paul: can you just put back FastHashMap?
3:51 AM me: No, because the memory leaks would reappear
3:52 AM Paul: why can't you just call Collections.synchronizeMap ?
 me: Well the idea of putting FastHashMap in originally was to avoid
the synchronization
3:53 AM ...for performance
 Paul: but the memory leak was because it created new maps?
3:54 AM me: No the memory leak was because the key used in the Map(s)
was Class and holding on to a Class prevents its ClassLoader being
garbage collected - not good for webapps
 Paul: ah
3:56 AM me: Clebert put forward a patch to
org.apache.collections.FastHashMap (which has been copied into
BeanUtils) - but IMO thats a no-can-do, since if Collections is in the
class path, then it may pick up that version. I think the solution is
to copy to org.apache.beanutils.FastHashMap and apply Leos patch. But
I didn't get round to it yet
3:57 AM Paul: nah...
  use the maven shade plugin
  allows you to use the library without those issues
3:58 AM me: I don't think so, since I need to make changes to FastHashMap
 Paul: are the changes not released yet?
4:01 AM me: There are no changes yet - just a proposal on a bug
ticket. That proposal is for the BeanUtils copy of FastHashMap - not
the collections one. I really don't want to get into having to release
Collections as well
  ...although perhaps you make a good point
4:02 AM Paul: Collections 3.3 is almost done
  i think 5 tickets left
4:03 AM me: Do you mind if I post this transcript to the Commons dev list?
 Paul: not at all.

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

View raw message