#6651·shenyu

[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