Url should accept null parameters list
--------------------------------------
Key: WICKET-3296
URL: https://issues.apache.org/jira/browse/WICKET-3296
Project: Wicket
Issue Type: Improvement
Components: wicket
Affects Versions: 1.5-M3
Reporter: Willis Blackburn
Priority: Minor
It's more natural to pass null than an empty list if there are no query
parameters. It would be a simple change since Url just copies the parameters
into its own list: if it's null then just don't copy.
public Url(List<String> segments, List<QueryParameter> parameters,
Charset charset)
{
Args.notNull(segments, "segments");
// Remove: Args.notNull(parameters, "parameters");
this.segments.addAll(segments);
if (parameters != null)
this.parameters.addAll(parameters);
setCharset(charset);
}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.