[ 
https://issues.apache.org/jira/browse/OAK-6277?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Davide Giannella closed OAK-6277.
---------------------------------

Bulk close for 1.7.1

> UserQueryManager: redundant check for colliding bound and offset
> ----------------------------------------------------------------
>
>                 Key: OAK-6277
>                 URL: https://issues.apache.org/jira/browse/OAK-6277
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core
>            Reporter: angela
>            Assignee: angela
>            Priority: Trivial
>             Fix For: 1.8, 1.7.1
>
>
> while writing unit tests for the {{UserQueryManager}} i noticed the following 
> check for collision between the bound value and the offset:
> {code}
> XPathQueryBuilder builder = new XPathQueryBuilder();
> [...]
> Value bound = builder.getBound(); 
> if (bound != null && offset > 0) {
>       log.warn("Found bound {} and offset {} in limit. Discarding offset.", 
> builder.getBound(), offset);
>       offset = 0;
> }
> {code}
> however, the {{XPathQueryBuilder}} already takes care of resetting 
> offset/bound if the other limit is set. The extra check in the query manager 
> is therefore superfluous and the statement will never be reached IMO.
> cc: [~alex.parvulescu], [~mduerig]
>             



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to