Skip to content

Commit

Permalink
fix the decoding issue of kryo and fst
Browse files Browse the repository at this point in the history
  • Loading branch information
li-shen committed Oct 31, 2015
1 parent 3be9af7 commit 85b9ab1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,7 @@ public Object decode(Channel channel, InputStream input) throws IOException {
Class<?>[] pts;

// NOTICE modified by lishen
int argNum = -1;

if (CodecSupport.getSerialization(channel.getUrl(), serializationType) instanceof OptimizedSerialization) {
argNum = in.readInt();
}
int argNum = in.readInt();
if (argNum >= 0) {
if (argNum == 0) {
pts = DubboCodec.EMPTY_CLASS_ARRAY;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,13 @@ protected void encodeRequestData(Channel channel, ObjectOutput out, Object data)

// NOTICE modified by lishen
// TODO
if (getSerialization(channel) instanceof OptimizedSerialization) {
if (!containComplexArguments(inv)) {
out.writeInt(inv.getParameterTypes().length);
} else {
out.writeInt(-1);
}
if (getSerialization(channel) instanceof OptimizedSerialization && !containComplexArguments(inv)) {
out.writeInt(inv.getParameterTypes().length);
} else {
out.writeInt(-1);
out.writeUTF(ReflectUtils.getDesc(inv.getParameterTypes()));
}

Object[] args = inv.getArguments();
if (args != null)
for (int i = 0; i < args.length; i++){
Expand Down

5 comments on commit 85b9ab1

@Xiaobaxi
Copy link

@Xiaobaxi Xiaobaxi commented on 85b9ab1 Aug 4, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这次的修改会导致调用老的dubbo服务报错,Failed to invoke the method 错误
DubboCodec和DecodeableRpcInvocation有问题

@fengyapeng
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我都已经吃过一次亏了。

@limingwei
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

怎么办
怎么办

@kemixkoo
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

所以千万千万千万要用稳定版

@kemixkoo
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这次的修改会导致调用老的dubbo服务报错,Failed to invoke the method 错误
DubboCodec和DecodeableRpcInvocation有问题

经过验证,导致不能兼容稳定版本2.8.4, 强烈要求revert

Please sign in to comment.