mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-10-17 18:14:50 +00:00
Update PacketBus.java
perf[net]: 删除无用的类型强制转换
This commit is contained in:
1 parent
2e10e6db10
commit
6b4c08854e
1 file changed
+1
-2
@@ -13,7 +13,6 @@
|
|||||||
|
|
||||||
package com.zfoo.net.router.route;
|
package com.zfoo.net.router.route;
|
||||||
|
|
||||||
import com.zfoo.event.model.event.IEvent;
|
|
||||||
import com.zfoo.net.packet.PacketService;
|
import com.zfoo.net.packet.PacketService;
|
||||||
import com.zfoo.net.router.attachment.GatewayAttachment;
|
import com.zfoo.net.router.attachment.GatewayAttachment;
|
||||||
import com.zfoo.net.router.attachment.HttpAttachment;
|
import com.zfoo.net.router.attachment.HttpAttachment;
|
||||||
@@ -83,7 +82,7 @@ public abstract class PacketBus {
|
|||||||
|
|
||||||
AssertionUtils.isTrue(paramClazzs.length != 3 || IAttachment.class.isAssignableFrom(paramClazzs[2]), "[class:{}] [method:{}],the third parameter must be IAttachment type parameter Exception.", bean.getClass().getName(), method.getName());
|
AssertionUtils.isTrue(paramClazzs.length != 3 || IAttachment.class.isAssignableFrom(paramClazzs[2]), "[class:{}] [method:{}],the third parameter must be IAttachment type parameter Exception.", bean.getClass().getName(), method.getName());
|
||||||
|
|
||||||
var packetClazz = (Class<? extends IEvent>) paramClazzs[1];
|
var packetClazz = paramClazzs[1];
|
||||||
var attachmentClazz = paramClazzs.length == 3 ? paramClazzs[2] : null;
|
var attachmentClazz = paramClazzs.length == 3 ? paramClazzs[2] : null;
|
||||||
var packetName = packetClazz.getCanonicalName();
|
var packetName = packetClazz.getCanonicalName();
|
||||||
var methodName = method.getName();
|
var methodName = method.getName();
|
||||||
|
|||||||
Reference in new issue
Block a user