angela created OAK-6277:
---------------------------

             Summary: 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


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