Skip to content

N1qlJoinResolver has duplicated condition #1566

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rbleuse opened this issue Sep 24, 2022 · 0 comments · Fixed by #1587
Closed

N1qlJoinResolver has duplicated condition #1566

rbleuse opened this issue Sep 24, 2022 · 0 comments · Fixed by #1587
Assignees
Labels
type: bug A general bug

Comments

@rbleuse
Copy link
Contributor

rbleuse commented Sep 24, 2022

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) { )
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Sep 24, 2022
@mikereiche mikereiche added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Oct 4, 2022
@mikereiche mikereiche self-assigned this Oct 4, 2022
mikereiche added a commit that referenced this issue Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants