Skip to content

Commit

Permalink
tmp: fix build errors caused by not yet exposed Stream APIs from guav…
Browse files Browse the repository at this point in the history
…a-android
  • Loading branch information
quh4gko8 committed Jun 11, 2024
1 parent 3489fe5 commit 2f0372a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import static app.attestation.auditor.attestation.Constants.ATTESTATION_PACKAGE_INFO_PACKAGE_NAME_INDEX;
import static app.attestation.auditor.attestation.Constants.ATTESTATION_PACKAGE_INFO_VERSION_INDEX;
import static com.google.common.collect.ImmutableList.toImmutableList;
import static com.google.common.collect.Streams.stream;
//import static com.google.common.collect.Streams.stream;
import static java.nio.charset.StandardCharsets.UTF_8;

import com.google.common.collect.ImmutableList;
Expand Down Expand Up @@ -58,7 +58,7 @@ private AttestationApplicationId(byte[] attestationApplicationId) {
attestationApplicationIdSequence.getObjectAt(
ATTESTATION_APPLICATION_ID_PACKAGE_INFOS_INDEX);
packageInfos =
stream(attestationPackageInfos.iterator())
Utils.stream(attestationPackageInfos)
.map(ASN1Sequence.class::cast)
.map(AttestationPackageInfo::new)
.collect(toImmutableList());
Expand All @@ -68,7 +68,7 @@ private AttestationApplicationId(byte[] attestationApplicationId) {
attestationApplicationIdSequence.getObjectAt(
ATTESTATION_APPLICATION_ID_SIGNATURE_DIGESTS_INDEX);
signatureDigests =
stream(digests.iterator())
Utils.stream(digests)
.map(ASN1OctetString.class::cast)
.map(ASN1OctetString::getOctets)
.map(ByteString::copyFrom)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1092,7 +1092,7 @@ private ImmutableSet<Integer> findIntegerSetAuthorizationListEntry(int tag) {
if (asn1Set == null) {
return ImmutableSet.of();
}
return Utils.collectToImmutableSet(java.util.Arrays.stream(asn1Set.toArray()).map(ASN1Parsing::getIntegerFromAsn1));
return Utils.stream(asn1Set).map(ASN1Parsing::getIntegerFromAsn1).collect(toImmutableSet());
}

private Optional<Duration> findOptionalDurationSecondsAuthorizationListEntry(int tag) {
Expand Down

0 comments on commit 2f0372a

Please sign in to comment.