mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-05-30 18:24:00 +00:00
perf[protocol]: 简化获取ProtocolRegistration,提高性能
This commit is contained in:
@@ -70,9 +70,7 @@ public class ProtocolManager {
|
||||
}
|
||||
|
||||
public static IProtocolRegistration getProtocol(short protocolId) {
|
||||
var protocol = protocols[protocolId];
|
||||
AssertionUtils.notNull(protocol, "[protocolId:{}]协议不存在,可能没有注册该协议或者协议号错误", protocolId);
|
||||
return protocol;
|
||||
return protocols[protocolId];
|
||||
}
|
||||
|
||||
public static ProtocolModule moduleByProtocolId(short id) {
|
||||
|
||||
Reference in New Issue
Block a user