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 find that not all of them can be parameterized (such as > > > the Map that represents the HTTP session), but you can Annotate them > > > with @SuppressWarnings("unchecked") (or whichever annotation it is). > > > > > > Actually those can even be done properly by typing them as: > > > > Map<String,?> session > > > > Or better Map<String, Object>. > 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<String,? extends Object> Which is just a long-hand way of saying: May<String,?> (*Chris*) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]