[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-net-dev
Subject:    Updated URLEncodedQueryString
From:       Michael.McMahon () Sun ! COM (Michael McMahon)
Date:       2007-08-03 8:22:10
Message-ID: 46B2E5B2.7060601 () sun ! com
[Download RAW message or body]

Richard Kennard wrote:
> Chris,
>
> Thanks for your feedback. And actually, picky is good! I much prefer 
> picky feedback to no feedback at all.
>
> I have updated the JavaDoc with your suggestions:
>
>    
> https://jdk-collaboration.dev.java.net/servlets/ProjectForumMessageView?messageID=20922&forumID=1463 
>
>
> However, on the question of...
>
> > How about [getParameterValues] returning an empty list if the 
> parameter does not exist?
>
> ...I guess this comes down to whose behaviour it makes more sense to 
> model. Do we model the behaviour of getParameterNames, as you suggest, 
> and return an empty List, or do we model the behaviour of 
> getParameterValue (it's non-plural version) and return null if the 
> parameter does not exist?
>
> I've leaned towards the latter, but I am open to reasons to lean 
> toward the former.
>
I agree with Chris. It is generally thought to be better practice to 
return empty collection objects
rather than null. It means that calling code often does not need special 
handling for this case.

We should finalize the spec soon. I will submit it to the CCC on Tuesday 
next week, unless
there are any further issues raised before then. Monday is a holiday here.

Thanks
Michael


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic