Is check for null is better in this case? Should I create a JIRA issue, or it
is better to see what other have to say?

Alex


Matej Knopp-2 wrote:
> 
> PagePameters is mutable object. I don't think one shared empty
> instance is a good idea.
> 
> -Matej
> 
> On Sun, May 3, 2009 at 11:44 AM, Johan Compagner <[email protected]>
> wrote:
>> make a jira issue for this.
>>
>> On Sun, May 3, 2009 at 11:38, Objelean Alex <[email protected]>
>> wrote:
>>
>>> When using getPageParameters(), I used to have some troubles because
>>> forgetting to call page super(params). As a result, getPageParameters()
>>> returns null. This problem also occur when working with non bookmarkable
>>> page. My suggestion is to take advantage of Null Object Pattern
>>> <http://en.wikipedia.org/wiki/Null_Object_pattern> and
>>> if the pageParameters object is null to return PageParameters.NULL
>>> (empty)
>>> instance. This way, the client of the code wouldn't have to worry about
>>> NPE
>>> check. Any thoughts?
>>> Thank you!
>>> Alex
>>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-Improvement--getPageParameters%28%29-tp23354130p23358894.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to