Skip to content

Conversation

@RachelTucker
Copy link
Contributor

Generated 4.1.1 API
Added parsing of blob checksum headers for Head Object response


final ImmutableMap.Builder<Long, String> builder = ImmutableMap.builder();

for (final String key : headers.keys()) {
Copy link
Contributor

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)));

Copy link
Contributor Author

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?

Copy link
Contributor

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;
Copy link
Contributor

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.

@rpmoore rpmoore merged commit 2a1ec2b into SpectraLogic:4_1_autogen Feb 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants