Adam,

Thanks for the reply! I will spend some time reading that material and try to solve it myself.

-Adrian

Adam Heath wrote:
Adrian Crum wrote:
I have refactored the OFBiz FlexibleMapAccessor so that it
does some of the same magic as FlexibleStringExpander
(compact objects, reusable null object, factory method,
expression cache).

The problem is, I have re-introduced a number of type-safety
compiler warnings. I'm not a generics guru and I don't know
how to fix them. In addition, code that calls the factory
method generates type-safety warnings too.

If it isn't too much to ask, could you take a look at it
once I get it committed, and then do your generics magic on
it? I'll just commit the FlexibleMapAccessor class first,
and wait before converting any peripheral code over to the factory method.

This is an open-ended response to this community.  I watch my compile
output, and when I see messages saying to turn on -X:deprecation, in
components I've already converted, I just silently fix the new warnings
that occur.  I completely understand that generics take time to learn,
and am more than willing to convert for other people.

I may not fix warnings when they are first introduced.  I may not even
compile each new changeset as they are committed.  As is well known, we
all vary in the time we give to processing ofbiz, so if I don't add
generics to something you've done, don't fret, it'll happen eventually.

I will eventually also produce a best practices doc for doing this to
ofbiz.  I probably have enough experience with doing this for this
project, to write it now, but was sorta waiting until I got the entire
codebase converted.  I've been slowly working with the components, which
is taking a bit longer than expected.

As a bonus, the following url is quite excellent, in helping to answer
estoeric questions about java generics; it kinda requires a basic
understanding of them first, however.  It also comes in a 4.5M pdf.

http://www.angelikalanger.com/GenericsFAQ/JavaGenericsFAQ.html

Reply via email to