You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Brian Munroe <br...@gmail.com> on 2007/08/16 22:40:40 UTC
Has getParameterNames been updated to use Generics?
This is more of a Servlet API question, but pertains to Tomcat
nonetheless. I am using Tomcat 5.5.23 with JDK 1.6.
I am having a problem with Generics and request.getParameterNames().
I keep getting a unchecked cast warning (just a warning, but still).
I was going to just use the @SuppressWarnings annotation, since I
pretty much can guarantee that the method will always return an
Enumeration of Strings, right?
Just making sure I would be following the standard idiom until it gets fixed.
thanks
-- brian
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Has getParameterNames been updated to use Generics?
Posted by Brian Munroe <br...@gmail.com>.
On 8/17/07, Bill Barker <wb...@wilshire.com> wrote:
>
> This is on the list of things for the Servlet 3.0 spec
> (http://www.jcp.org/en/jsr/detail?id=315), but that means you will have to
> wait for Tomcat 7.0.x to get the "fix". All of the Servlet 2.x specs
> specify a non-generic Enumeration for this method.
>
Ok good to know. Thanks for the link to the details!
-- brian
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Has getParameterNames been updated to use Generics?
Posted by Bill Barker <wb...@wilshire.com>.
"Brian Munroe" <br...@gmail.com> wrote in message
news:2b39c1040708161340t57eaf60cyb6fcddfa9d5f3fc9@mail.gmail.com...
> This is more of a Servlet API question, but pertains to Tomcat
> nonetheless. I am using Tomcat 5.5.23 with JDK 1.6.
>
> I am having a problem with Generics and request.getParameterNames().
> I keep getting a unchecked cast warning (just a warning, but still).
>
> I was going to just use the @SuppressWarnings annotation, since I
> pretty much can guarantee that the method will always return an
> Enumeration of Strings, right?
>
Yes, the spec guarantees that it returns an Enumeration of Strings.
> Just making sure I would be following the standard idiom until it gets
> fixed.
>
This is on the list of things for the Servlet 3.0 spec
(http://www.jcp.org/en/jsr/detail?id=315), but that means you will have to
wait for Tomcat 7.0.x to get the "fix". All of the Servlet 2.x specs
specify a non-generic Enumeration for this method.
> thanks
>
> -- brian
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org