This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch 3.2
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/3.2 by this push:
new b39a1e82e1 Generic call by gson support null args (#12832)
b39a1e82e1 is described below
commit b39a1e82e1a1b9bd018405e54d5680b0d587f519
Author: TomlongTK <[email protected]>
AuthorDate: Thu Aug 3 21:42:56 2023 +0800
Generic call by gson support null args (#12832)
---
.../src/main/java/org/apache/dubbo/rpc/filter/GenericFilter.java | 3 +++
1 file changed, 3 insertions(+)
diff --git
a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/GenericFilter.java
b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/GenericFilter.java
index a63ef57eb8..d78a35ebaf 100644
---
a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/GenericFilter.java
+++
b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/GenericFilter.java
@@ -208,6 +208,9 @@ public class GenericFilter implements Filter,
Filter.Listener, ScopeModelAware {
private Object[] getGsonGenericArgs(final Object[] args, Type[] types) {
return IntStream.range(0, args.length).mapToObj(i -> {
+ if (args[i] == null) {
+ return null;
+ }
if (!(args[i] instanceof String)) {
throw new RpcException("When using GSON to deserialize generic
dubbo request arguments, the arguments must be of type String");
}