Re: [S2] Code does not use generics too much

2008-03-06 Thread Brian Pontarelli
David Durham, Jr. wrote: On Thu, Mar 6, 2008 at 2:42 PM, Brian Pontarelli <[EMAIL PROTECTED]> wrote: You can't put things into Maps that have wildcards. The compiler complains because Object really isn't '?'. Although most language pragmatist would tell you it is. But the language zealots

Re: [S2] Code does not use generics too much

2008-03-06 Thread David Durham, Jr.
On Thu, Mar 6, 2008 at 2:42 PM, Brian Pontarelli <[EMAIL PROTECTED]> wrote: > You can't put things into Maps that have wildcards. The compiler > complains because Object really isn't '?'. Although most language > pragmatist would tell you it is. But the language zealots say otherwise, > and tho

Re: [S2] Code does not use generics too much

2008-03-06 Thread Brian Pontarelli
Correct me if I'm wrong but I believe that restricts the map to only accepting values that are exactly Object. It will not allow things that extend Object, only Object themselves. You could use: Map Which is just a long-hand way of saying: May You can't put things into Maps that have wil

Re: [S2] Code does not use generics too much

2008-03-06 Thread Robert
FYI: Over the period of a year I gradually moved a medium size code base 450 Classes to Generics. Towards the very end I started to trust IntelliJ 7s Automated Generification for blocks of code. I believe it can change a whole code base over with a click of a button, though I haven't used it.

Re: [S2] Code does not use generics too much

2008-03-06 Thread Antonio Petrelli
2008/3/6, Giovanni Azua <[EMAIL PROTECTED]>: > > hi Antonio, > > Is it required to be officially a contributor to volunteer? I am very > tempted :) > > Any time frame in mind? I can not look yet while in the office. Just post patches in the previously mentioned issues, and there is no time frame

Re: [S2] Code does not use generics too much

2008-03-06 Thread Giovanni Azua
hi Antonio, Is it required to be officially a contributor to volunteer? I am very tempted :) Any time frame in mind? I can not look yet while in the office. best regards, Giovanni Antonio Petrelli wrote: 2008/3/5, Wes Wannemacher <[EMAIL PROTECTED]>: Go ahead and start a JIRA Her

Re: [S2] Code does not use generics too much

2008-03-06 Thread Antonio Petrelli
2008/3/5, Wes Wannemacher <[EMAIL PROTECTED]>: > Go ahead and start a JIRA Here they are: http://jira.opensymphony.com/browse/XW-615 https://issues.apache.org/struts/browse/WW-2537 I have no time at the moment for working on it (I'm working for Tiles too, you know...), so if anyone else wants to

Re: [S2] Code does not use generics too much

2008-03-06 Thread Antonio Petrelli
2008/3/6, Chris Pratt <[EMAIL PROTECTED]>: > > Correct me if I'm wrong but I believe that restricts the map to only > accepting values that are exactly Object. Well, yes and no... It restricts the maps to be used that have exactly the type: Map But it does not mean that you cannot use as a value

Re: [S2] Code does not use generics too much

2008-03-06 Thread Chris Pratt
On Thu, Mar 6, 2008 at 12:15 AM, Antonio Petrelli <[EMAIL PROTECTED]> wrote: > 2008/3/6, Chris Pratt <[EMAIL PROTECTED]>: > > > > > On Wed, Mar 5, 2008 at 2:57 PM, Wes Wannemacher <[EMAIL PROTECTED]> wrote: > > > If you are going to parameterize the collections that are > > > used, you will fi

Re: [S2] Code does not use generics too much

2008-03-06 Thread Antonio Petrelli
2008/3/6, Chris Pratt <[EMAIL PROTECTED]>: > > On Wed, Mar 5, 2008 at 2:57 PM, Wes Wannemacher <[EMAIL PROTECTED]> wrote: > > If you are going to parameterize the collections that are > > used, you will find that not all of them can be parameterized (such as > > the Map that represents the HTTP

Re: [S2] Code does not use generics too much

2008-03-05 Thread Chris Pratt
On Wed, Mar 5, 2008 at 2:57 PM, Wes Wannemacher <[EMAIL PROTECTED]> wrote: > If you are going to parameterize the collections that are > used, you will find that not all of them can be parameterized (such as > the Map that represents the HTTP session), but you can Annotate them > with @Suppress

Re: [S2] Code does not use generics too much

2008-03-05 Thread Wes Wannemacher
On Wed, 2008-03-05 at 11:34 -0800, Chris Pratt wrote: > On Wed, Mar 5, 2008 at 11:13 AM, Antonio Petrelli > <[EMAIL PROTECTED]> wrote: > > Hi all, > > I've seen that Struts 2 (along with XWork code) do not use generics > > "completely". > > I see too many maps and lists without type. I think th

Re: [S2] Code does not use generics too much

2008-03-05 Thread Chris Pratt
On Wed, Mar 5, 2008 at 11:13 AM, Antonio Petrelli <[EMAIL PROTECTED]> wrote: > Hi all, > I've seen that Struts 2 (along with XWork code) do not use generics > "completely". > I see too many maps and lists without type. I think they should be > corrected, we use Java 5 and generics are probably

[S2] Code does not use generics too much

2008-03-05 Thread Antonio Petrelli
Hi all, I've seen that Struts 2 (along with XWork code) do not use generics "completely". I see too many maps and lists without type. I think they should be corrected, we use Java 5 and generics are probably the best feature of it. Antonio -