mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-10-15 12:15:15 +00:00
Merge pull request #56 from jincieryi/patch-1
Update ProtocolAnalysis.java
This commit is contained in:
1 file changed
+2
-2
@@ -412,13 +412,13 @@ public class ProtocolAnalysis {
|
|||||||
Type type = field.getGenericType();
|
Type type = field.getGenericType();
|
||||||
|
|
||||||
if (!(type instanceof ParameterizedType)) {
|
if (!(type instanceof ParameterizedType)) {
|
||||||
throw new RunException("[class:{}]中数组类型声明不正确,[field:{}]不是泛型类", clazz.getCanonicalName(), field.getName());
|
throw new RunException("[class:{}]中Map类型声明不正确,[field:{}]不是泛型类", clazz.getCanonicalName(), field.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
Type[] types = ((ParameterizedType) type).getActualTypeArguments();
|
Type[] types = ((ParameterizedType) type).getActualTypeArguments();
|
||||||
|
|
||||||
if (types.length != 2) {
|
if (types.length != 2) {
|
||||||
throw new RunException("[class:{}]中数组类型声明不正确,[field:{}]必须声明泛型类", clazz.getCanonicalName(), field.getName());
|
throw new RunException("[class:{}]中Map类型声明不正确,[field:{}]必须声明泛型类", clazz.getCanonicalName(), field.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
IFieldRegistration keyRegistration = typeToRegistration(clazz, types[0]);
|
IFieldRegistration keyRegistration = typeToRegistration(clazz, types[0]);
|
||||||
|
|||||||
Reference in new issue
Block a user