Skip to content

N1qlJoinResolver has duplicated condition #1566

Closed
@rbleuse

Description

@rbleuse

Hi, I was checking the code in N1qlJoinResolver and there's a duplicated condition, which makes the 2nd not reachable :

} else if (lhCollection != null && rhCollection == null) {
// the lhs has a collection (and therefore a scope as well), but the rhs does not have a collection.
// Use the lhScope and lhCollection for the entity. The rhs is just the bucket.
return new KeySpacePair(lhCollection, x(i(bucketName) + "." + i(lhScope) + "." + i(lhCollection)), //
null, i(bucketName));
} else if (lhCollection != null && rhCollection == null) {

I think (from reading comments) :

  • the 1st condition should be } else if (lhCollection != null && rhCollection == null) { (or even shorter } else if (lhCollection != null) { )
  • the 2nd should be } else if (lhCollection == null && rhCollection != null) { (or even shorter } else if (rhCollection != null) { )

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions