Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Auth Manager API part 1: HTTPRequest, HTTPHeader #11769
Auth Manager API part 1: HTTPRequest, HTTPHeader #11769
Changes from 6 commits
7db53d8
e486e0d
0449744
d9a05fb
4c0e650
56ff7b2
ca6eb1e
2848e42
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be
Set<HTTPHeader>
? This would also take care of cases where there are actualy k/v duplicates (which we don't appear to handle)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like we should also annotate this as
@NotNull
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see a
@NotNull
annotation available in iceberg-core? Besides, the immutable generated class is annotated with@AllParametersAreNonNullByDefault
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@danielcweeks
@NotNull
shouldn't be needed here, because everything not marked as@Nullable
or Optional is implicitly not null with ImmutablesThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, set
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same idiomatic comment here. Generally we use
with
prefix for builders, not mutators.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like
putIfAbsent()
is more idiomatic here. Otherwise it just code would generally be redundant:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@danielcweeks I actually suggested the
withHeaderIfAbsent
in #11769 (comment) because the previous name suggested/implied that the object is modified in-place and the header is (potentially) added (which isn't true). We actually always have to use the return type of the method, since it creates a new object if the header isn't present