Re: svn commit: r686377 - in /ofbiz/trunk/applications/accounting: src/org/ofbiz/accounting/ src/org/ofbiz/accounting/invoice/ src/org/ofbiz/accounting/payment/ src/org/ofbiz/accounting/thirdparty/paypal/ src/org/ofbiz/accounting/thirdparty/worldpay/

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r686377 - in /ofbiz/trunk/applications/accounting: src/org/ofbiz/accounting/ src/org/ofbiz/accounting/invoice/ src/org/ofbiz/accounting/payment/ src/org/ofbiz/accounting/thirdparty/paypal/ src/org/ofbiz/accounting/thirdparty/worldpay/

Scott Gray
Hi Adam

Thanks for the info, it is interesting (yet tedious) work that I think
it is important to understand.

Do you think my commits are likely to get in your way?  I know
conflicts are a PITA and I'm happy to leave it while you do your
thing, otherwise I had just planned to move down through the
components one at a time when I have time.

Also, you mention moving to the Fast* collections "where appropriate",
in your opinion where would it be inappropriate to do so?

Thanks
Scott

2008/8/16 Adam Heath <[hidden email]>:

> [hidden email] wrote:
>>
>> Author: lektran
>> Date: Fri Aug 15 14:40:30 2008
>> New Revision: 686377
>>
>> URL: http://svn.apache.org/viewvc?rev=686377&view=rev
>> Log:
>> Various clean ups, no functional changes
>
> While not having any specific feedback on this revision, I thought I might
> as well mention what code changes I have been working on.
>
> Adding generics markup(this is the biggest one).
> Switching from StringBuffer to StringBuilder
> Enhanced for(Iterable stuff)
> Getting rid of new (Boolean|Byte|Double|Float|Integer|Long|Short)
> Switching to FastList|FastMap|FastSet where appropriate
> Fixing string +, to use StringBuilder, in loops
>
> I do this, not by looking at any compiler warnings, but by editting every
> single file, and looking at every line.
>
> One thing I'd like to mention about generics; you may have noticed that in
> some places, there is a Map<String, Object>, and in others, a Map<String, ?
> extends Object>, and wondered what the different is.  In the latter case,
> the simple explanation is that it effectively stops the code from inserting
> *new* items into the map.  Ie, it makes it read-only.  You can still remove
> and fetch items, however.  (if you are interested in a more detailed
> explanation, just ask).
>
> I use this to tell generic services that they should not modify the incoming
> context.  It is also used when fetching a list of elements from a DOM.
>
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r686377 - in /ofbiz/trunk/applications/accounting: src/org/ofbiz/accounting/ src/org/ofbiz/accounting/invoice/ src/org/ofbiz/accounting/payment/ src/org/ofbiz/accounting/thirdparty/paypal/ src/org/ofbiz/accounting/thirdparty/worldpay/

Adam Heath-2
Scott Gray wrote:

> Also, you mention moving to the Fast* collections "where appropriate",
> in your opinion where would it be inappropriate to do so?

Where the sort order needs to be something other than natural, namely,
using a Linked(Map|Set) or Tree(Map|Set).  The order is not defined when
using the Fast* variants(at least, not that I could find documented in
their api).
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r686377 - in /ofbiz/trunk/applications/accounting: src/org/ofbiz/accounting/ src/org/ofbiz/accounting/invoice/ src/org/ofbiz/accounting/payment/ src/org/ofbiz/accounting/thirdparty/paypal/ src/org/ofbiz/accounting/thirdparty/worldpay/

Scott Gray
Ah ok gotcha, that makes perfect sense

Thanks
Scott

2008/8/16 Adam Heath <[hidden email]>:
> Scott Gray wrote:
>
>> Also, you mention moving to the Fast* collections "where appropriate",
>> in your opinion where would it be inappropriate to do so?
>
> Where the sort order needs to be something other than natural, namely, using
> a Linked(Map|Set) or Tree(Map|Set).  The order is not defined when using the
> Fast* variants(at least, not that I could find documented in their api).
>