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 |
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 > |
Adrian Crum wrote:
> Adam, > > Thanks for the reply! I will spend some time reading that material and > try to solve it myself. I also started doing stuff on a much smaller project, where it is easier to keep more in the head at once. Then, after a few months there, I started doing ofbiz wholesale, and that is what made me get commit privs again. I didn't tell anyone I was doing it, and did a whole bunch first, which then just helped me to learn how to do it even better. |
Adam,
Thanks for encouraging me to learn this stuff. I figured out most of it. I still had to suppress warnings on the factory method though - since I want to return an untyped instance but I need to create a typed instance to return. -Adrian --- On Thu, 12/11/08, Adam Heath <[hidden email]> wrote: > From: Adam Heath <[hidden email]> > Subject: Re: Forthcoming FlexibleMapAccessor refactor > To: [hidden email] > Date: Thursday, December 11, 2008, 9:16 AM > Adrian Crum wrote: > > Adam, > > > > Thanks for the reply! I will spend some time reading > that material and > > try to solve it myself. > > I also started doing stuff on a much smaller project, where > it is easier > to keep more in the head at once. > > Then, after a few months there, I started doing ofbiz > wholesale, and > that is what made me get commit privs again. I didn't > tell anyone I was > doing it, and did a whole bunch first, which then just > helped me to > learn how to do it even better. |
Free forum by Nabble | Edit this page |