-
Notifications
You must be signed in to change notification settings - Fork 563
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
接口传参中,有null时,处理异常 #73
Comments
序列化框架的问题 kryo/protostuff都有这个问题, protostuff的ArraySchemas.java类对pojos以及基本类型都有支持, 唯独Object[] 不支持包含null元素 |
@chywwq 已经workaround, 请先下载最新代码, 需要设置一个参数(默认为false): |
1、需要在服务端和客户端同时加上该参数 arg1:null |
@chywwq 1. 是的, 两端都要设置, 默认是不支持的 2. 请详细说下什么问题, 最好给下你的测试条件, 我没测出来 |
@chywwq 我补充了测试用例, 你可以帮忙看下什么条件没覆盖, 没出现你说的情况2 |
关于protostuff的bug, 我提交了一个PR: protostuff/protostuff#253 |
简单总结下, 这个issue其实包含两个问题:
|
调用后报错:
Exception in thread "main" org.jupiter.rpc.exception.JupiterBizException: java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.String
at org.jupiter.rpc.consumer.future.DefaultInvokeFuture.setException(DefaultInvokeFuture.java:215)
at org.jupiter.rpc.consumer.future.DefaultInvokeFuture.doReceived(DefaultInvokeFuture.java:189)
at org.jupiter.rpc.consumer.future.DefaultInvokeFuture.received(DefaultInvokeFuture.java:243)
at org.jupiter.rpc.consumer.processor.task.MessageTask.run(MessageTask.java:81)
at org.jupiter.rpc.executor.CallerRunsExecutorFactory$1.execute(CallerRunsExecutorFactory.java:36)
at org.jupiter.rpc.consumer.processor.DefaultConsumerProcessor.handleResponse(DefaultConsumerProcessor.java:52)
at org.jupiter.transport.netty.handler.connector.ConnectorHandler.channelRead(ConnectorHandler.java:52)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at org.jupiter.transport.netty.handler.IdleStateChecker.channelRead(IdleStateChecker.java:186)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1359)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:935)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:141)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:451)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)
The text was updated successfully, but these errors were encountered: