-
Notifications
You must be signed in to change notification settings - Fork 13
4.1 API #541
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
4.1 API #541
Conversation
|
|
||
| final ImmutableMap.Builder<Long, String> builder = ImmutableMap.builder(); | ||
|
|
||
| for (final String key : headers.keys()) { |
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.
You could update this to:
headers.keys()
.stream()
.filter(key -> key.startsWith(BLOB_CHECKSUM_HEADER))
.foreach(key -> builder.put(getOffsetFromHeaderKey(key), getBlobChecksumValue(key, headers)));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.
are we using Java 8 in the SDK now?
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.
Yes.
| } | ||
| switch (checksumType) { | ||
| case "CRC_32": | ||
| return ChecksumType.Type.CRC_32; |
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.
You should be able to use the built in ChecksumType.Type.valueOf(checksumType) method to do this same logic.
Generated 4.1.1 API
Added parsing of blob checksum headers for Head Object response