From 0ea1c5a1879ce4154132077dcf8fcf9c7757c3cd Mon Sep 17 00:00:00 2001 From: Nikita Lebedev Date: Mon, 18 Sep 2023 16:32:27 +0300 Subject: [PATCH] Hotfix issue #1571. Signed-off-by: Nikita Lebedev --- sdk/src/main/java/com/hedera/hashgraph/sdk/AccountInfo.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sdk/src/main/java/com/hedera/hashgraph/sdk/AccountInfo.java b/sdk/src/main/java/com/hedera/hashgraph/sdk/AccountInfo.java index 47f172946..463674855 100644 --- a/sdk/src/main/java/com/hedera/hashgraph/sdk/AccountInfo.java +++ b/sdk/src/main/java/com/hedera/hashgraph/sdk/AccountInfo.java @@ -19,6 +19,8 @@ */ package com.hedera.hashgraph.sdk; +import static java.util.stream.Collectors.toList; + import com.google.common.base.MoreObjects; import com.google.protobuf.InvalidProtocolBufferException; import com.hedera.hashgraph.sdk.proto.CryptoGetInfoResponse; @@ -261,7 +263,7 @@ static AccountInfo fromProtobuf(CryptoGetInfoResponse.AccountInfo accountInfo) { var liveHashes = Arrays.stream(accountInfo.getLiveHashesList().toArray()) .map((liveHash) -> LiveHash.fromProtobuf((com.hedera.hashgraph.sdk.proto.LiveHash) liveHash)) - .toList(); + .collect(toList()); Map relationships = new HashMap<>(); @@ -317,7 +319,7 @@ public static AccountInfo fromBytes(byte[] bytes) throws InvalidProtocolBufferEx CryptoGetInfoResponse.AccountInfo toProtobuf() { var hashes = Arrays.stream(liveHashes.toArray()) .map((liveHash) -> ((LiveHash) liveHash).toProtobuf()) - .toList(); + .collect(toList()); var accountInfoBuilder = CryptoGetInfoResponse.AccountInfo.newBuilder() .setAccountID(accountId.toProtobuf())