You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Willis Blackburn (JIRA)" <ji...@apache.org> on 2011/01/01 21:01:46 UTC

[jira] Created: (WICKET-3296) Url should accept null parameters list

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.


[jira] Resolved: (WICKET-3296) Url should accept null parameters list

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3296?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-3296.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5-M4

Improved with r1054427.
Added additional constructor that accepts only list of segments and charset.

> 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
>            Assignee: Martin Grigorov
>            Priority: Minor
>             Fix For: 1.5-M4
>
>
> 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.


[jira] Assigned: (WICKET-3296) Url should accept null parameters list

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3296?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov reassigned WICKET-3296:
---------------------------------------

    Assignee: Martin Grigorov

> 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
>            Assignee: Martin Grigorov
>            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.