Tidy up fillInStackTrace implementations (#62555)
Removes the unnecessary `synchronized` introduced in #62433 and adjusts the others to return `this` not `null` as required by the parent method's Javadocs.
This commit is contained in:
parent
c83d8ce78e
commit
06d5d360f9
|
@ -41,6 +41,6 @@ public class NotMasterException extends ElasticsearchException {
|
|||
|
||||
@Override
|
||||
public Throwable fillInStackTrace() {
|
||||
return null;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ public class VersionConflictEngineException extends EngineException {
|
|||
}
|
||||
|
||||
@Override
|
||||
public synchronized Throwable fillInStackTrace() {
|
||||
public Throwable fillInStackTrace() {
|
||||
// This is on the hot path for updates; stack traces are expensive to compute and not very useful for VCEEs, so don't fill it in.
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -38,6 +38,6 @@ public class NodeDisconnectedException extends ConnectTransportException {
|
|||
|
||||
@Override
|
||||
public Throwable fillInStackTrace() {
|
||||
return null;
|
||||
return this;
|
||||
}
|
||||
}
|
|
@ -35,7 +35,7 @@ public class NotSerializableTransportException extends TransportException {
|
|||
|
||||
@Override
|
||||
public Throwable fillInStackTrace() {
|
||||
return null;
|
||||
return this;
|
||||
}
|
||||
|
||||
private static String buildMessage(Throwable t) {
|
||||
|
|
|
@ -34,7 +34,4 @@ public class ReceiveTimeoutTransportException extends ActionTransportException {
|
|||
super(in);
|
||||
}
|
||||
|
||||
// @Override public Throwable fillInStackTrace() {
|
||||
// return fillStack();
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -48,6 +48,6 @@ public class RemoteTransportException extends ActionTransportException implement
|
|||
@Override
|
||||
public Throwable fillInStackTrace() {
|
||||
// no need for stack trace here, we always have cause
|
||||
return null;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,6 +38,6 @@ public class ResponseHandlerFailureTransportException extends TransportException
|
|||
|
||||
@Override
|
||||
public Throwable fillInStackTrace() {
|
||||
return null;
|
||||
return this;
|
||||
} // why is this?
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue