Hi Manu & All,
Small correction. This should be corrected as;
if (env.params
> && (
> env.params.offset && env.params.limit
> )
> ) {
You can access the same with query params as below. Note that
env.request.queryParams
is an empty-map when there is no query params.
if (env.request.queryParams.offset && env.request.queryParams.limit) {
env.queryParams && should be removed since we should always have an empty
> map. Otherwise it's easy for developers to get null pointer errors
+1, We should also add empty map for env.params as well.
Thanks,
Rasika
On Thu, Jun 23, 2016 at 9:34 PM, Manuranga Perera <[email protected]> wrote:
> if (env.queryParams && (env.queryParams.offset && env.queryParams.limit))
>> {
>
> env.queryParams && should be removed since we should always have an
> empty map. Otherwise it's easy for developers to get null pointer errors
>
>
> --
> With regards,
> *Manu*ranga Perera.
>
> phone : 071 7 70 20 50
> mail : [email protected]
>
--
With Regards,
*Rasika Perera*
Software Engineer
M: +94 71 680 9060 E: [email protected]
LinkedIn: http://lk.linkedin.com/in/rasika90
WSO2 Inc. www.wso2.com
lean.enterprise.middleware
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev