Remove the synchronized flag of fillInStackTrace method to improve performance while throwing exception. (#10031)
Motivation: The method body of fillInStackTrace method of TimeoutException class in FixedChannelPool.java is so simple (just return this) that there is no need to be marked as synchronized. Modification: Remove the synchronized flag of fillInStackTrace method. Result: It can improve performance slightly while throwing a TimeoutException.
This commit is contained in:
parent
d348ae9e7a
commit
862efc618c
@ -197,7 +197,7 @@ public class FixedChannelPool extends SimpleChannelPool {
|
||||
task.promise.setFailure(new TimeoutException(
|
||||
"Acquire operation took longer then configured maximum time") {
|
||||
@Override
|
||||
public synchronized Throwable fillInStackTrace() {
|
||||
public Throwable fillInStackTrace() {
|
||||
return this;
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user