Last week, I asked about whether using java 1.5 features was allowed; the response I got was ok. So, I've gone to town, adding lots of stuff to the framework code. While doing so, I've come upon a few questions I need to ask.
First, what is the policy on read-only maps? The entity and service engines take incoming maps in several places(conditions, runSync, etc). Who owns the map when in those cases? If I create a condition with a map, or call a service with the map, is the ofbiz code allowed to modify the map passed in? The generics markup has a feature that allows me to effectively mark a collection as read-only(can't put values into it, but *can* remove items from it, or fetch values). Second, I've noticed a rather critical bug. When I extended the entity cache years ago, I added a feature that would remove cached Lists of GenericValue(List<GenericValue>) from UtilCache. This was done by iterating the values in the cache table, and calling it.remove(). Calling remove is supposed to remove the item from the cached entry. However, when UtilCache was extended to support storing values on disk, the iterator returned by getCacheLineValues() is a copy; calling it.remove() on the collection does *not* remove the item from the backing store. ps: My work continues on adding java 1.5 features to ofbiz. I'm adding generics markup to all of framework/. I'm also using enhanced for loops, Integer.valueOf(in place of parseInt), auto-boxing, StringBuilder, etc). == [EMAIL PROTECTED]:/job/ofbiz/ofbiz-svn$ svk diff /job/ofbiz/ofbiz-svn/framework|diffstat|tail -n1 215 files changed, 4046 insertions(+), 4786 deletions(-) == pps: While doing this work, I'm also doing what amounts to a code review; as such, I have found several logic bugs(one I have already mentioned). I'll start sending some of those issues tomorrow.
