Add some missing toString() implementations (#39124)
Sometimes we turn objects into strings for logging or debugging using `toString()`, but the default implementation is often unhelpful. This change improves on this in two places I ran into recently.
This commit is contained in:
parent
210f34f8e9
commit
0a9574c9d4
|
@ -68,4 +68,9 @@ public class ActionListenerResponseHandler<Response extends TransportResponse> i
|
|||
public Response read(StreamInput in) throws IOException {
|
||||
return reader.read(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + "/" + listener;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -196,6 +196,11 @@ public class ReplicationOperation<
|
|||
replicaException, ReplicationOperation.this::decPendingAndFinishIfNeeded,
|
||||
ReplicationOperation.this::onPrimaryDemoted, throwable -> decPendingAndFinishIfNeeded());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "[" + replicaRequest + "][" + shard + "]";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue