struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Huber <gregh3...@gmail.com>
Subject Re: Struts 2.5.3 & 2.3.31 ready for test
Date Thu, 06 Oct 2016 07:58:46 GMT
Well, I will do this:

String[] p = (String[]) this.params.get(key);
        if (p != null && p.length > 0) {
            return p[0];
        }

So if its not an string I may get a cast exception.  Are they always
strings if its from the request?

On 6 October 2016 at 08:55, Lukasz Lenart <lukaszlenart@apache.org> wrote:

> 2016-10-06 9:48 GMT+02:00 Greg Huber <gregh3269@gmail.com>:
> > For the HttpParameters ParameterAware change
> >
> > private Map<String, Object> params = Collections.emptyMap();
> > ...
> > setParameters(HttpParameters parameters) {
> >    this.params = parameters.toMap();
> > }
> >
> > and use as before? (although it was a String, String[]).
>
> Hm... good point, maybe it makes sense revert it back to "String,
> String[]" to avoid conflicts and add a new interface when you want to
> use HttpParameters, wdyt?
>
>
> Regards
> --
> Ɓukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message