Sncp的部分Attribute.type()改为genericType方法

This commit is contained in:
Redkale
2018-11-28 09:18:12 +08:00
parent 9493aa43a7
commit d7e7113201
2 changed files with 4 additions and 4 deletions

View File

@@ -307,7 +307,7 @@ public final class SncpClient {
byte i;
while ((i = reader.readByte()) != 0) {
final Attribute attr = action.paramAttrs[i];
attr.set(params[i - 1], bsonConvert.convertFrom(attr.type(), reader));
attr.set(params[i - 1], bsonConvert.convertFrom(attr.genericType(), reader));
}
Object rs = bsonConvert.convertFrom(Object.class, reader);
@@ -327,7 +327,7 @@ public final class SncpClient {
byte i;
while ((i = reader.readByte()) != 0) {
final Attribute attr = action.paramAttrs[i];
attr.set(params[i - 1], bsonConvert.convertFrom(attr.type(), reader));
attr.set(params[i - 1], bsonConvert.convertFrom(attr.genericType(), reader));
}
return bsonConvert.convertFrom(action.handlerFuncParamIndex >= 0 ? Object.class : action.resultTypes, reader);
} catch (RpcRemoteException re) {
@@ -471,7 +471,7 @@ public final class SncpClient {
int i;
while ((i = (reader.readByte() & 0xff)) != 0) {
final Attribute attr = action.paramAttrs[i];
attr.set(params[i - 1], bsonConvert.convertFrom(attr.type(), reader));
attr.set(params[i - 1], bsonConvert.convertFrom(attr.genericType(), reader));
}
Object rs = bsonConvert.convertFrom(action.handlerFuncParamIndex >= 0 ? Object.class : action.resultTypes, reader);
handler.completed(rs, handlerAttach);

View File

@@ -196,7 +196,7 @@ public final class SncpDynServlet extends SncpServlet {
org.redkale.util.Attribute attr = paramAttrs[i];
if (attr == null) continue;
out.writeByte((byte) i);
convert.convertTo(out, attr.type(), attr.get(params[i - 1]));
convert.convertTo(out, attr.genericType(), attr.get(params[i - 1]));
}
}
out.writeByte((byte) 0);