From 007dbc8fb9758cd4a84413ad6df25700bb6ac324 Mon Sep 17 00:00:00 2001 From: godotg Date: Tue, 31 Oct 2023 11:16:17 +0800 Subject: [PATCH] perf[protocol]: throw en exception --- .../com/zfoo/protocol/registration/ProtocolAnalysis.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/protocol/src/main/java/com/zfoo/protocol/registration/ProtocolAnalysis.java b/protocol/src/main/java/com/zfoo/protocol/registration/ProtocolAnalysis.java index d9f3888e..42da7d82 100644 --- a/protocol/src/main/java/com/zfoo/protocol/registration/ProtocolAnalysis.java +++ b/protocol/src/main/java/com/zfoo/protocol/registration/ProtocolAnalysis.java @@ -599,7 +599,8 @@ public class ProtocolAnalysis { // 不支持多维数组或集合嵌套数组类型,仅支持一维数组 throw new RunException("Multi-dimensional array or set nested arrays [type:{}] types are not supported, only one-dimensional arrays are supported", type); } else if (clazz.equals(List.class) || clazz.equals(Set.class) || clazz.equals(Map.class)) { - throw new RunException("不支持数组和集合联合使用[type:{}]类型", type); + // 不支持数组和集合联合使用类型 + throw new RunException("The combination of arrays and collections with the [type:{}] type is not supported", type); } else { checkUnsupportedType(clazz); // 是一个协议引用变量 @@ -617,14 +618,16 @@ public class ProtocolAnalysis { /** - * 此方法仅在生成协议的时候调用,一旦运行,不能调用 + * EN: This method is only called when the protocol is generated, and cannot be called once it is run + * CN: 此方法仅在生成协议的时候调用,一旦运行,不能调用 */ public static Set getFirstSubProtocolIds(short protocolId) { return subProtocolIdMap.get(protocolId); } /** - * 此方法仅在生成协议的时候调用,一旦运行,不能调用 + * EN: This method is only called when the protocol is generated, and cannot be called once it is run + * CN: 此方法仅在生成协议的时候调用,一旦运行,不能调用 */ public static Set getAllSubProtocolIds(short protocolId) { // 初始化完成过后不能调用getAllSubProtocolIds