ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrey Gura (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (IGNITE-3407) HTTP REST: query commands without pageSize failed with NPE
Date Sun, 14 Aug 2016 15:51:20 GMT

    [ https://issues.apache.org/jira/browse/IGNITE-3407?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15420374#comment-15420374
] 

Andrey Gura edited comment on IGNITE-3407 at 8/14/16 3:50 PM:
--------------------------------------------------------------

Saikat, change looks good. But I think that additional exception handling is redundant because
each {{callLocalSafe()}} call returns future with exception if query failed. Just return instance
of {{GridFinishFuture}} with exception in case of {{pageSize}} is {{null}} and delegate exception
handling to upper level (remove additional exception handling):

{code}
    if (pageSize == null)
        return new GridFinishedFuture<>(
                new IgniteCheckedException(GridRestCommandHandlerAdapter.missingParameter("pageSize"))
        );
{code}


was (Author: agura):
Saikat, change looks good. But I think that additional exception handling is redundant because
each {{callLocalSafe()}} call returns future with exception if query failed. Just return instance
of {{GridFinishFuture}} with exception in case of {{pageSize}} is {{null}} and delegate exception
handling to upper level (remove additional exception handling):

{{code}}
    if (pageSize == null)
        return new GridFinishedFuture<>(
                new IgniteCheckedException(GridRestCommandHandlerAdapter.missingParameter("pageSize"))
        );
{{code}}

> HTTP REST: query commands without pageSize failed with NPE
> ----------------------------------------------------------
>
>                 Key: IGNITE-3407
>                 URL: https://issues.apache.org/jira/browse/IGNITE-3407
>             Project: Ignite
>          Issue Type: Bug
>          Components: general
>    Affects Versions: 1.6
>            Reporter: Andrey Novikov
>            Assignee: Saikat Maitra
>             Fix For: 1.8
>
>
> org/apache/ignite/internal/processors/rest/handlers/query/QueryCommandHandler.java:125
> Need return response with error.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message