Skip to content

Commit

Permalink
fix NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
Anshu Agarwal committed Apr 24, 2024
1 parent db33815 commit b3774da
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ public ShardIterator shardsIt() {

public ShardRouting(ShardId shardId, StreamInput in) throws IOException {
this.shardId = shardId;
currentNodeId = in.readOptionalString() != null ? in.readOptionalString().intern() : null;
String currentNodeIdFromStream = in.readOptionalString();
currentNodeId = currentNodeIdFromStream != null ? currentNodeIdFromStream.intern() : null;
relocatingNodeId = in.readOptionalString();
primary = in.readBoolean();
state = ShardRoutingState.fromValue(in.readByte());
Expand Down

0 comments on commit b3774da

Please sign in to comment.