[BUG] 当请求参数为空或为空字符串时,会发生 NPE/IndexOutOfBoundsException
作者: Aias00创建于 2026年8月3日更新于 2026年9月19日
标签type: bugplugin: grpcpriority: high
- 严重性: 高
- 文件:
shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-grpc/src/main/java/org/apache/shenyu/plugin/grpc/client/ShenyuGrpcClient.java:75,81 - 描述: 当
parameterTypes为空时,param可以为空,并导致执行client.call()。在call()中,第 75 行GsonUtils.getInstance().toObjectMap(requestJsons)使用空值返回了空值;JsonMessage.buildJsonMessageList(null)发生 NPE。即使返回了一个空列表,第 81 行jsonRequestList.get(0)也会引发IndexOutOfBoundsException。
内容来源: apache/shenyu