Skip to content

Commit

Permalink
fix error BC_BAD_CAST_TO_ABSTRACT_COLLECTION in RaftClientReply
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveTeng0 committed Mar 5, 2024
1 parent 3a84779 commit 69bacfe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@

import java.util.Collection;
import java.util.Collections;
import java.util.List;

/**
* Reply from server to client
Expand Down Expand Up @@ -201,7 +200,7 @@ public long getLogIndex() {
public String toString() {
return super.toString() + ", "
+ (isSuccess()? "SUCCESS": "FAILED " + exception)
+ ", logIndex=" + getLogIndex() + ", peer info=" + ProtoUtils.toString((List<PeerInfoProto>) peerInfos);
+ ", logIndex=" + getLogIndex() + ", peer info=" + ProtoUtils.toStringPeerInfo(peerInfos);
}

public boolean isSuccess() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ static String toString(Collection<CommitInfoProto> protos) {
return protos.stream().map(ProtoUtils::toString).collect(Collectors.toList()).toString();
}

static String toString(List<PeerInfoProto> protos) {
static String toStringPeerInfo(Collection<PeerInfoProto> protos) {
return protos.stream().map(ProtoUtils::toString).collect(Collectors.toList()).toString();
}

Expand Down

0 comments on commit 69bacfe

Please sign in to comment.