Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-3296

Url should accept null parameters list

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.5-M3
    • 1.5-RC1
    • wicket
    • None

    Description

      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); }

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            mgrigorov Martin Tzvetanov Grigorov
            wboyce@panix.com Willis Blackburn
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment