Sncp的部分Attribute.type()改为genericType方法
This commit is contained in:
@@ -307,7 +307,7 @@ public final class SncpClient {
|
|||||||
byte i;
|
byte i;
|
||||||
while ((i = reader.readByte()) != 0) {
|
while ((i = reader.readByte()) != 0) {
|
||||||
final Attribute attr = action.paramAttrs[i];
|
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);
|
Object rs = bsonConvert.convertFrom(Object.class, reader);
|
||||||
|
|
||||||
@@ -327,7 +327,7 @@ public final class SncpClient {
|
|||||||
byte i;
|
byte i;
|
||||||
while ((i = reader.readByte()) != 0) {
|
while ((i = reader.readByte()) != 0) {
|
||||||
final Attribute attr = action.paramAttrs[i];
|
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);
|
return bsonConvert.convertFrom(action.handlerFuncParamIndex >= 0 ? Object.class : action.resultTypes, reader);
|
||||||
} catch (RpcRemoteException re) {
|
} catch (RpcRemoteException re) {
|
||||||
@@ -471,7 +471,7 @@ public final class SncpClient {
|
|||||||
int i;
|
int i;
|
||||||
while ((i = (reader.readByte() & 0xff)) != 0) {
|
while ((i = (reader.readByte() & 0xff)) != 0) {
|
||||||
final Attribute attr = action.paramAttrs[i];
|
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);
|
Object rs = bsonConvert.convertFrom(action.handlerFuncParamIndex >= 0 ? Object.class : action.resultTypes, reader);
|
||||||
handler.completed(rs, handlerAttach);
|
handler.completed(rs, handlerAttach);
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ public final class SncpDynServlet extends SncpServlet {
|
|||||||
org.redkale.util.Attribute attr = paramAttrs[i];
|
org.redkale.util.Attribute attr = paramAttrs[i];
|
||||||
if (attr == null) continue;
|
if (attr == null) continue;
|
||||||
out.writeByte((byte) i);
|
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);
|
out.writeByte((byte) 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user