Skip to content
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

DeleteOptions#isRecurse incorrectly returns true #263

Closed
sleberknight opened this issue Aug 17, 2023 · 0 comments · Fixed by #264
Closed

DeleteOptions#isRecurse incorrectly returns true #263

sleberknight opened this issue Aug 17, 2023 · 0 comments · Fixed by #264
Assignees
Labels
bug Something isn't working
Milestone

Comments

@sleberknight
Copy link
Member

This is from the original consul-client issues list: Recurse to false in delete options not working

This return if the value is present, not if the value is true or false!
if you set the value to false, this returns true, so the query is send with recurse = true

Basically, DeleteOptions#isRecurse returns true when the Optional<Boolean> returned by getRecurse() is present, which means it returns true for both Optional<Boolean.TRUE> and Optional<FALSE>. Clearly it should actually test the value if the Optional contains one.

Also see #210

@sleberknight sleberknight added the bug Something isn't working label Aug 17, 2023
@sleberknight sleberknight added this to the 1.1.1 milestone Aug 17, 2023
@sleberknight sleberknight self-assigned this Aug 17, 2023
sleberknight added a commit that referenced this issue Aug 18, 2023
sleberknight added a commit that referenced this issue Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant