Updated URLEncodedQueryString

Christopher Hegarty - Sun Microsystems Ireland Christopher.Hegarty at Sun.COM
Thu Aug 2 02:55:19 PDT 2007


Some initial (picky) comments:

1) "Thread Safety
     Instances of UrlEncodedQueryString are not not synchronized."

     Typo: "not not".

     I would expand this a little. Maybe taking wording similar to
     java.util.HashMap:

      "Note that this implementation is not synchronized. If multiple
      threads access a query string concurrently, and at least one of the
      threads modifies the query string, it must be synchronized
      externally. This is typically accomplished by synchronizing on some
      object that naturally encapsulates the query string."

2) Consistency when documenting to how separators are handled.

    parse(java.net.URI uri)
     "...When parsing, all separators from the Separators enum are
     recognised."

     I would change this as follows:
     "...When parsing, all Separators are recognised."

3) getParameterValues

    "Returns an array of String objects containing all of the values
     the named parameter has, or null if the parameter does not exist.

     If the parameter has a single value, the array has a length of 1."

    Should read:
    "Returns a List of String objects containing all of the values
     the named parameter has, or..."

     How about returning an empty list if the parameter does not exist?
     Similar to getParameterNames, "an empty Iterator if there are no
     parameters"

     Also, typo in @returns
      "an List of String objects..." -> "a List of String objects..."

-Chris.

Richard Kennard wrote:

> Michael,
> 
> I have further updated URLEncodedQueryString to incorporate everybody's 
> JavaDoc feedback:
> 
>    
> https://jdk-collaboration.dev.java.net/servlets/ProjectForumMessageView?messageID=20908&forumID=1463 
> 
> 
> Hoped to hear from you soon,
> 
> Richard.
> 
> 
> 



More information about the net-dev mailing list