Remove the synchronized flag of fillInStackTrace method to improve performance while creating exception instance. (#10033)
Motivation: The method body of fillInStackTrace method of IllegalStateException class in SimpleChannelPool.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 creating a IllegalStateException instance.
This commit is contained in:
parent
862efc618c
commit
dcd62c2598
@ -352,7 +352,7 @@ public class SimpleChannelPool implements ChannelPool {
|
||||
} else {
|
||||
closeAndFail(channel, new IllegalStateException("ChannelPool full") {
|
||||
@Override
|
||||
public synchronized Throwable fillInStackTrace() {
|
||||
public Throwable fillInStackTrace() {
|
||||
return this;
|
||||
}
|
||||
}, promise);
|
||||
|
Loading…
Reference in New Issue
Block a user